LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Show Color dialog, color selector (as on colorbox click)

Solved!
Go to solution

Hello everybody

 

I have the following wish (problem ?) . I want to show the colordialog which usually comes up when you click onto a color box, to be controlled by clicking onto a cell of a listbox.

Here are some screenshots to see clearer my problem. The main thing is that it is not possible to manipulate labviews legends in a way I want. Therefore I want to use the following layout. To save space I  want to color the first column with the plot color. This all works perfectly.

I only want to be able to change the color os the plot and the cell by the nice color selector.

legend.JPG 

color select.jpg 

 

 

Do you have any idea how to access this object. 

 

I am aware that I could use .NET but ist would be nice to have the labviews one.

 

Best regards

 

Gernot 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 1 of 11
(5,781 Views)
You can find an example here.

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

I am sorry but this is not the solution which helps me. One one side you need an additional click when using the normal mous down event. And then you have the colorbox on the screen where it seems to be impossible to set the whole box to transparent color. (which usually makes sense)

 

The .NET aproach also leads to too much clicks neccessary compared to the "normal" color box approach.

 

But thank you for the great idea 

 

Gernot 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 3 of 11
(5,747 Views)

Hi Gernot,

you can use a color control and simulate a mouse click if the mouse is over this control.

 

Mike

0 Kudos
Message 4 of 11
(5,733 Views)

notti wrote:

I am sorry but this is not the solution which helps me.


I'm not sure what your problem is. Did you look at the actual example I uploaded? It shows the basic concept of how to replicate that dialog yourself. How you use it exactly depends on your needs.


___________________
Try to take over the world!
Message 5 of 11
(5,704 Views)

Thank you for all your help.

 

The main problem seems for me that I am not able to use a "faked" color box control as I want to use the click of an element in a multicolumn listbox by using the left mouse button as in the color box control.

The example with the menu on the right button works fine.

Don't worry I have  made a workaraounn by using an additional array of color controls which looks like a separate column of the listbox. The only thing which is now not perfect is that I need a little bit more space on my front panel and I am not able to put the text I want into the color box so I need one column more.

 

Gernot  

 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 6 of 11
(5,667 Views)

You can control the background color of a cell in a multicolumn listbox by creating a property node and using the ActiveCell.CellBG property. You can color the whole column by iterating over it or by setting the row in the ActiveCell property to -2.

 

You can detect a click on a specific cell by using the Mouse Down event and feeding the data from the Coords terminal of the event into the listbox's Point to Row Column method, which will tell you which cell was clicked.


___________________
Try to take over the world!
0 Kudos
Message 7 of 11
(5,658 Views)

Yes that's fine but it is impossible to use a single mouse click there to show the color selector. A popup with a .NET color selection would be possible but not the singe click method to show the same color selector as shown when using a color box.

I wanted to avoid as much clicks as possible.

 

Thank you

 

Gernot 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 8 of 11
(5,653 Views)
Solution
Accepted by topic author nottilie

I really don't see the issue. See this snippet (drag it into a diagram to use it) - one click shows the selector, the second selects the color.

 

 Color Selector.png


___________________
Try to take over the world!
Message 9 of 11
(5,644 Views)
The snippet seems to mess up the Z order of the objects, so here's the VI in 8.6.

___________________
Try to take over the world!
Message 10 of 11
(5,640 Views)