Wed, 09/28/2022 - 11:16 am
I am using a listboxe to show a summary of a subset of a large inventory. There are also other buttons that allow you to filter which items you see. There is a notes field for the inventory that gets modified a lot to track the status of items. I had it that you could update an item by double-clicking it, and it would bring up a modal dialog to modify the entry, but people in the lab were requesting the ability to edit the notes directly in the listbox. I was able to implement that, and the edit is started with a double-click.
However, there is a strange glitch. If the user is in the middle of editting a note in the listbox, and then changes the filter, the contents of the listbox change as it populates with the new list of items, except for the cell being editted. When the user ends the edit (by clicking somewhere else, or hitting enter), then the "End edit" event code (7) gets issued, and then my code updates the new item in that spot on the list, instead of the one the user selected in the first place.
Does anyone have a suggestion how to deal with this? Is there a way to force an end to a listbox edit before the list repopulates? I couldn't figure out how to do it with setEditCell. I would be grateful for suggestions.