LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open the CVI color selector popup?

In our application we are using text background colors as legends in many places. The user wants to click and use it like a color numeric control to modify the legend color. Can we operate the CVI color selector popup by program? We have no problem to create and place a color numeric control after the first mouse click, but how can we show the selector popup without an extra mouse click? Or should we post a fake mouse click through Win32 API?
Download All
0 Kudos
Message 1 of 3
(2,767 Views)
This is a very tricky problem. You cannot get the color selector that you see in the .uir editor to appear on the screen during run-time. I was thinking of possible workarounds, and the only one I could think of was creating a panel with numerous textboxs that would have all the possible colors to select. I was able to dynamically create them within a panel. However, this poses some interesting problems. You have to dynamically create the callback functions for all 100+ textboxes you create, so that you could get the color attribute for each when a user clicked on them. Not an easy task to say the least. But that is looking like your best option. If you would like to view m project, just comment back, and I will post it for you. Thanks, and have a grea
t day.

Daniel McChane
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,767 Views)
Thanks for your effort and i would indeed be interested to see and continue your project, as you offered. Let's hope in some future version of CVI we can invoke a ColorSelectPopup similar to the FileSelectPopup.
0 Kudos
Message 3 of 3
(2,767 Views)