06-25-2009 10:59 AM
If you have a multicolumn listbox control and you click on a row the cell of the first column will get a dotted line around itself - an outline. Now let's say that you need to programmatically set the value of the listbox - what happens to the outline? You would expect the newly selected row to get outlined...or even better that no cell is outlined at all, however what happens is that the cell that was last clicked is still outlined - and not the first cell in the row that the list is now set to have as its value...messy. Is it a bug, and is there a way to get around it?
One way to get around it is to set the listbox to be an indicator instead....You'll need to add code to get the highlighting of the clicked row etc...that is fine, but a bigger hurdle is the fact that you now do not get any value change events from it because it is an indicator...
I now have the choice to either use an indicator and rewrite the code to handle the lack of value change events (a big operation)..or just ignore the strange behaviour of the cell outlining (too ugly).
Have I overlooked a simple solution?
06-25-2009 11:15 AM
The lack of a value change event on the indicator is not a problem as the code you need to add to simulate the control behaviour with the indicator in any case will detect the row selection (using the coordinates of a mouse click event)...You can then (still) programmatically trigger a signalling value change event as a substitute for the lack of such events from the user interface...
If would be nice if the outlining worked properly though(!)
06-25-2009 11:26 AM
Would
1) Set selection color to smae as thetext background (to shut of the cell selection indications)
2) When you change a cell set the background color of that cell
help?
Ben
06-25-2009 11:47 AM
When I got my focus away from the strange outlining issue I figured out that all I really had to change when using the listbox as an indicator was to replace the value change event with a mouse click filter event and the Point to row column invoke node...I then write the row to a value (signalling) property of the multicolumn listbox to get back to the behaviour I would get if it was a control...
Less code than what any cell manipulation on a control would require so I'm happy, although of course the outlining behaviour should not have been an issue in the first place.
06-26-2009 09:13 AM