LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

color pallette in run time menu

Hi,

is there a way to put color pallete/color selection box in custom run time menu?

 

Thanks,

Ritesh

0 Kudos
Message 1 of 8
(4,161 Views)

You can use a colorbox control to enter colors at run time.

0 Kudos
Message 2 of 8
(4,158 Views)

I want it in a run time menu and not a separate control

 

gridColor.png

 

 

Is this possible?

0 Kudos
Message 3 of 8
(4,137 Views)

I think you would have to create your own containers in order to accomplish this.  I was hoping that ms paint would have an activeX control that could be implemented in order to accomplish this, but I haven't been able to find anything.  So, in short, I think altenbach's suggestion is your best and easiest way to give the user a usable color palette - try putting a color box in a tab control, or something similar.

Julian R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(4,101 Views)
If you feel adventurous you could try the .net clolur dialogue:
http://msdn.microsoft.com/en-us/library/system.windows.forms.colordialog.aspx
Im afraid I dont have any examples though.
0 Kudos
Message 5 of 8
(4,086 Views)

Here's kind of a kludgy way to do it (I haven't tried it, but it should work):

Have a color box on the FP that's hidden.

Trap the 'Menu Selection?' event, and within that event case, unhide the color box and move it under the mouse pointer.

Discard the menu selection.  Trap the 'Mouse down' event on the color box, and re-hide it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 8
(4,035 Views)

@paul_cardinale wrote:

Here's kind of a kludgy way to do it (I haven't tried it, but it should work):

Have a color box on the FP that's hidden.

Trap the 'Menu Selection?' event, and within that event case, unhide the color box and move it under the mouse pointer.

Discard the menu selection.  Trap the 'Mouse down' event on the color box, and re-hide it.


I have done just that before and the results are pretty good.  As long as you remember to hide the color box again after a selection, or user dismisses the selection.  Otherwise you have a one pixel color box on top of what ever part of the control the user right clicked.

0 Kudos
Message 8 of 8
(4,032 Views)