LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Listbox Edit Event

Hello,
 
I am using a multicolumn listbox to allow a user to edit and view channel information.  They add new channels and rename them through editing the cell, which I monitor using an event structure.  I added a function to watch for the "tab" key, which will move the edit position over one column, just like users are used to in Excel.  However, I am having trouble, because when they hit the tab key, the "edit cell" event doesn't get generated, and the entry from the column to the left is lost.  Basically, the item names don't get updated unless the user presses "Enter" to accept the edit of the current cell.
 
Is there a way to generate the edit event for that listbox, or to otherwise save the edit before moving on to the next column?  I know that tables can accomplish this pretty easily, but I didn't go that way for other reasons that made the development harder.
 
Thanks,
Rob
0 Kudos
Message 1 of 2
(3,289 Views)
Normally, you'll get a value changed event when you hit tab. So if you catch the tab key, and manually skip to the next cell, you don't get that. In fact, you still get the value change event, but only after the table looses focus.I guess you found out about that...


If you still want to trigger the value change event, you can simply read the value of the table (with a property or local) and put it in a "value (signalling)". Then, the value changed event will be triggered.


The only difference is that the old value will be the same as the new value. You can get around that by manually buffering the old value in the value event. So you'll have another table with the old value, and update it only when the value changed event is called. If you need the old value, of course.


Regards,


Wiebe.
0 Kudos
Message 2 of 2
(3,261 Views)