From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multicolumn Listbox Rows Resizing Issue and Cell Click Event Issue

Solved!
Go to solution

1) I'm currently using a multicolumn listbox with the front panel of it set to 240 height which roughly displays a header row, 11 rows and 9 columns.

Ideally I want at least 20 rows, with the height being fixed at 240, and a scrollbar to scroll down to the rows that couldn't fit inside.

 

However, if i change the rows to 20 either through front panel property or programatically, the multicolumn listbox would resize itself to over 240 height to fit all the rows resulting in an useless scrollbar and a listbox that doesnt fit properly in my front panel.

 

Before:

mlc.png

 

 

After: (It invaded my other controls)

mlc2.png

 

 

2) Is it possible to click a cell and programatically change the active cell to the one I clicked?

Currently when I try to click on row 3 column 3 cell, It would always display that I selected row 3 but always with the first column. I tried allowing edit cell, but to no avail.

0 Kudos
Message 1 of 4
(1,296 Views)

Ah nvm I fixed question 1, the ItemNames Array for row and column was in the wrong order.

 

mlc3.png

 

Still stuck on question 2 though

0 Kudos
Message 2 of 4
(1,280 Views)
Solution
Accepted by ricky48

@ricky48 wrote:

 

2) Is it possible to click a cell and programatically change the active cell to the one I clicked?

Change the ActiveCell property in the property node to write.

To calculate the active cell, you can use the coords terminal from the mouse down event and use an invoke node to call the listbox's Point to Row Column method.


___________________
Try to take over the world!
Message 3 of 4
(1,240 Views)

Thank you, worked out perfectly!

0 Kudos
Message 4 of 4
(1,226 Views)