LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically setting picture ring items

I have a ring of options for the user to run, and I need to update the options in some way to differentiate the ones that have been run from the ones that have not been run. I do not want to disable the ones that have run but if there was a mechanism for selectively making some items bold, or changing the background color of some items, but most properties apply to all elements.

I thought if the picture ring could be loaded dynamically, I could that could offer a solution but I don't see a way of doing that either.

Any suggestions would be greatly appreciated ...

thanx

 

lmd2 

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 1 of 11
(3,947 Views)
There is no option for dynamically placing the images into the ring, but you can use a picture control instead. If you care about the actual selector, you can present that as an array of picture controls.

___________________
Try to take over the world!
Message 2 of 11
(3,939 Views)

Hi Lawrence,

 

You could try using the "Strings []" Property.  You can write to this property, and could also format each string individually after indexing the array.  

 

Cheers, 

 

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 3 of 11
(3,918 Views)

well I tried it this way, making two of the three string constants bold, but in the menu control none were bold.

 

Untitled-1.jpg 

 

one option, but not very elegant would be to make untested options upper case and tested options lower case

but maybe I misunderstood you,  perhaps this may work with a picture ring but not a menu ring? I will give that a try

 

thanx

lmd2 

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 4 of 11
(3,912 Views)

Hi Lawrence,

 

You'd have to use a property node for the string for the bold effect.  Each string would have its own property node that you could bold and unbold.  See the snippet below:

 

bold_string.png

 

Try using this method, with a reference to the string, and then a Text>Font>Bold Property. 

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 5 of 11
(3,883 Views)

Also, the strings would have to be controls or indicators.  If you don't want the individual strings to show up on your front panel, just use the "Hide Control" option.

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 6 of 11
(3,880 Views)

Thanx but I am still missing something:

the need is to have all the options available in a drop down ring, but to differentiate ones that have already been selected.

since I need the options to be available in a drop down menu (either a menu ring, text ring, or picture ring, I am thinking)

if your approach requires each 'string' to be a control or indicator, how do I work that into a ring?

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 7 of 11
(3,853 Views)
Like I said, you can use an array of picture controls as the selector. You will need to use code to make it visible, resize it, place it and detect where the click was (using the Mouse Down event). You can mark the selected options by adding a border (rectangle) to those pictures using the picture control VIs.

___________________
Try to take over the world!
0 Kudos
Message 8 of 11
(3,851 Views)

Hi Lawrence,

 

I did some more meddling with this, and turns out that I could not edit the []Strings (which is how you would get to the properties of the individual strings of the enum or text ring) property when the VI is running--so this approach of individually accessing the strings of the enum to make some bold, and others not, will not work.  However, we can try the picture control route mentioned above.  I also thought, that while not as fancy, you could create a list on the side, seperate from the enum itself, and bold/unbold steps that have been run.  Another idea would be to disable the items that have been run, then if the user does click on them, have an event that fires that would enable and then select the item on the list. 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 9 of 11
(3,826 Views)

thanx for the follow-up

I like that second idea (disable, and capture as an event), going to play around with that for a try

 

lmd2 

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 10 of 11
(3,821 Views)