LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit Cell String Size

Solved!
Go to solution

Thank you for the sample. 😄

I created my event structure with 2 events.

First one is my multicolumn listbox with a mouse down event.

Second one is my multicolumn listbox with a value change.

 

My string length works , but only if i enter the location of my row and column manually.

I can't seem to get the position of the cell with my mouse down event.

The cell position row and column do not update with my mouse down event, always row 0 & column 0.

I used a property node with the element ActiveCell and sent the values to indicators, so I can see my results.

Do you know why the values in my indicators for the active cell are not updating?

0 Kudos
Message 11 of 16
(1,387 Views)

You need to use a key down event, not a mouse down because it is possible to tab between cells and never catch a mouse event.

aputman
0 Kudos
Message 12 of 16
(1,377 Views)

Switched to a key down event, but the rows and columns are still not updating from the event.

I can grab my row location from the multicolumn listbox property node Value element, but not sure if there is another good way of getting the column position.

0 Kudos
Message 13 of 16
(1,355 Views)

I'm not sure what you have tried since you aren't sharing any code.  What did you put in the key down event?  Is the above picture what is in the key down?  If so, that's your problem.

 

As an aside, the picture i posted a few posts back is a snippet.  Drag it to your desktop and then into a block diagram and it will pop down the code embedded in it.  Do that and make sure you have the correct property node in the key down event.  I'm using the Edit Position property which returns the row and column where the text edit is happening.

aputman
0 Kudos
Message 14 of 16
(1,342 Views)

My issue is that I was using a multicolumn listbox and not a table.

They don't share similar properties and was limiting me from getting the cell row and column the same way.

In order to get it to work the way I wanted with a multicolumn lisbox, I was able to use one event.

The event i used was Edit Cell and it gave me access to the row and column of the cell being edited in the Event Data Node.

 

Thank you for your time and help

0 Kudos
Message 15 of 16
(1,323 Views)

That changes everything then.  Your first post said "table".  Be specific because these are not the same.

Use the Edit Cell (?) filter event and you can change the data on the fly before the control is actually updated.  Or you can check Discard and it will ignore the user input altogether.  

 

Example_VI_BD.png

 

 

aputman
Message 16 of 16
(1,312 Views)