LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV 6.0.2 Multi-column listbox does not update selection

I have a multi-column listbox on the front panel of a state machine
program that I want to update to have all rows selected if the user
clicks on the header of column 0. I created a reference to the
listbox and am invoking the "Get Clicked Col Hdr" and using the output
to control a case structure. If the user clicks column zero, I read
the "NumRows" property of the listbox to a For Loop to generate the
numbers 0-N in an array. I then write this array to the "Value"
property. All rows should then be selected. In fact, they are, but
the Listbox does not redraw to show the selection (i.e., the rows are
not highlighted). If I probe the value of the listbox after writing
to the Value property, it does indeed show an upda
ted value, but the
rows are not highlighted. If I minimize the front panel or switch to
another program window and then return, the listbox is updated and all
the rows are highlighted. If I write the 0-N array to a local
variable instead of the "Value" property, the listbox redraws
immediately. Does anyone know why the Listbox does not redraw after
writing to the "Value" property node? Thanks.

sm
0 Kudos
Message 1 of 5
(3,033 Views)
Hi Greenman,

If the highlighting look correct after switch between windows (or minimizing etc) this indicates that the correct information has been passed to the video driver but just not displayed correctly.

I suggest you look into the various factors that control your video driver.

Try,
Changing your screen resolution,
Graphic accelerator settings,
Make sure driver matches your video sub-system,
Check on patches/updates for screen driver.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(3,033 Views)
If you wait a long time, does it eventually change? Try putting a delay "WAIT (ms)" after the change and see if the screen updates. If the program is in a loop without any delays then the processor stays busy and it seems that screen updates become low priority. Switching to another window and back forces the screen to update.

Rob
0 Kudos
Message 3 of 5
(3,033 Views)
I've been playing with this some myself. The highlighting seems to reflects what the user last selected, not the actual value of the control. I agree that this is probably not the proper behavior for this control and will bring it up to our R&D people. In the mean time, you might try working around the problem by giving your listbox control a transparent background and placing it over a listbox indicator of the same size (no text in the indicator). if you update the indicator with the control value, it will properly reflect the value with highlighting.

Aaron Marks
National Instruments
0 Kudos
Message 4 of 5
(3,033 Views)
Everyone,

Thanks for the tips. I haven't looked into the video driver as being
the likely culprit, but I haven't had any other video problems. And,
this seems unlikely since the selection highlighting draws correctly
when writing to a local variable rather than the value property. I
assume from Adam's comment that he was able to duplicate the behavior
at NI. I believe it to be a "bug", or just some undesirable behavior,
also because the control displays properly if a loacl variable is
used. This is the solution (using the local) I have chosen for now,
since the update code is on the same level as the control. I would
like to see a fix, though, since I might need to programatically
change the selection from a subvi sometime in the future. Thanks
again for the help.


sm
0 Kudos
Message 5 of 5
(3,033 Views)