LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change the colors of Ring texts individually so when it pulls down, I can see each test with different background color?

I have been using LabView for a almost 18 months now. There was no problem which I could not solve with help of all resources available. But, this is one where I am scratching my head since long time now.
 
I would like to change colors of each individual text in Ring control programmatically. I have attached example VI. In this VI, I change background color of ring text, but it changes only the current (active) background color, so when you pull down the whole menu, it shows same default color for all the text background (not even the color I asked it to). Is there anyway I can define individually as to what color should be related to each text in ring menu?
 
Download All
0 Kudos
Message 1 of 8
(5,322 Views)

" Is there anyway I can define individually as to what color should be related to each text in ring menu?"

Well not with a ring and not programatically.

The best I can suggest is a picture ring, see below.

 

Ben

Message Edited by Ben on 11-18-2005 02:16 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(5,310 Views)

I can suggest a better looking solution, but it will be harder to implement (although much more diverse).

The suggestion invloves using another control to display the list of options, i.e. you click on your "ring" (which could be a disabled ring controlled through locals) and your ring control becomes visible . The ideal would be a listbox (which I have used in the past to create a combobox where the values change dynamically as you type), but that doesn't have control over the colors.

What you can use instead is a table. You can control the position of the table, the number of visible rows and the color of each row, and the only real problem I could find is that it seems you can't make the lines fully transparent and that the row doesn't highlight when you move over it (although that can also be handled).

By using references you can delegate all the work to a subVI, et voila, you have a colorful ring control.


___________________
Try to take over the world!
Message 3 of 8
(5,290 Views)
Is it possible to show or display the elements of the ring ALL the time?
0 Kudos
Message 4 of 8
(5,284 Views)


@labview1958 wrote:
Is it possible to show or display the elements of the ring ALL the time?

Use a listbox instead of a ring (can be found in the List & Table palette). If LV 6.0 doesn't have it, you can use a table or an array.

___________________
Try to take over the world!
Message 5 of 8
(5,279 Views)
Thanks tst, but i did not follow completely about solution you suggested. Using table as ring? Can you be little more clear please?
0 Kudos
Message 6 of 8
(5,276 Views)

Here's a very quick and simple example (7.0).

Further improvements would be ignoring mouse down events for the table's scrollbar, changing the cursor when it enters the table and maybe highlighting the table element the cursor points to. By dynamically registering for events, you can place all the code in a subVI, which will only need the references of the ring and the table as inputs, and which will detect the events on its own.

If you come up with something nice, why not post it?


___________________
Try to take over the world!
Message 7 of 8
(5,269 Views)

Thanks tst,

I think that is an awesome work around way. I will see if I can make it better, I will post it right here in this post.

 

0 Kudos
Message 8 of 8
(5,241 Views)