05-18-2010 08:34 AM
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.
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
Solved! Go to Solution.
05-18-2010 08:41 AM
05-18-2010 09:46 AM
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
05-18-2010 10:16 AM
Hi Gernot,
you can use a color control and simulate a mouse click if the mouse is over this control.
Mike
05-19-2010 02:50 PM
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.
05-25-2010 12:04 AM
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
05-25-2010 01:21 AM
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.
05-25-2010 01:56 AM
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
05-25-2010 03:33 AM
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.
05-25-2010 03:40 AM