LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically change selected cell/row of multicolumn listbox

Solved!
Go to solution

@MGiacomet wrote:

>>Your MCLB datatype is defined as a scalar (selection mode 0 or 1 item or 1 item

Ok, my bad in the pic; but the (wrong) behavior is the same even if set for multiple selection


Seems fine here. See attached. As I said, you still have to decide which row you start from.

 


>>Your MCLB doesn't have the key focus

Setting Key Focus puts an extra border around the MCLB, which isn't shown (or needed) once you do a mouse click to start the selection


Fair enough. I don't particularly like the look of the border either, but as I said, I don't think I ever needed this.

 


___________________
Try to take over the world!
0 Kudos
Message 11 of 16
(970 Views)

And it looks like there are some workarounds for the key focus border:

 

https://forums.ni.com/t5/LabVIEW/How-do-I-get-rid-of-the-Key-Focus-object-border/m-p/844469#M383119

 

https://forums.ni.com/t5/LabVIEW/how-to-remove-String-key-focus-border/m-p/4054018#M1162990

 


___________________
Try to take over the world!
0 Kudos
Message 12 of 16
(964 Views)

Keeping "Focus" (pun intended), here...

 

There isn't really a way to programmatically start the selection (confirmed by NI's support); The MCLB needs a mouse click (you'll only see the dotted border around the selected item, thus indicating the selection starting point, if a mouse click happens) to start the selection.

0 Kudos
Message 13 of 16
(939 Views)

@MGiacomet wrote:

Keeping "Focus" (pun intended), here...

 

There isn't really a way to programmatically start the selection (confirmed by NI's support); The MCLB needs a mouse click (you'll only see the dotted border around the selected item, thus indicating the selection starting point, if a mouse click happens) to start the selection.


Fair enough. I personally don't like the highlighting of a single cell and set the MCLB to highlight the entire row, so I don't mind, but it is true that even though it does provide the requested functionality, it doesn't behave in the exact same way as clicking it with the mouse does.

 

I think that if I had a user who wanted it to behave in exactly the same way as happens when you click, then I would work around this by simulating a mouse click on the relevant cell.


___________________
Try to take over the world!
0 Kudos
Message 14 of 16
(931 Views)

Yeah, tried that... but if the user moves the mouse, the simulated click may happen at the wrong row/cell. Haven't found a way to temporarily disable the mouse to prevent this.

 

Clearly a bug (oops, NI will say "by design" 😜) that should have had a fix already.

0 Kudos
Message 15 of 16
(923 Views)

image.pngHi,

 

I am facing this exact issue. I have 2 MCLBs, which are somehow connected, in which, if a row of the first one is clicked, specific items in the second Box must appear. I can use Porperty Node to highlight a row in the first MCLB, but this does not simulate the actual click, which must lead to showing the selection in the second table. Is there any news on this issue? image.png

Seli6272@D
0 Kudos
Message 16 of 16
(485 Views)