Disable a desktoplistbox

I have a fairly straightforward input page.

It contains a listbox in which users may enter a few rows of information, which is then all saved at once (when users save). The problem was that after saving I disable the controls on the screen (after all, the user is done), but the last cell in the listbox where the user was remained active.

The way I was able to delete it:
• Set focus to a textfield (which is about to be disabled)
• Set listindex of listbox to -1

Disabling the listbox left the cell editable.

If I’ve missed something, please let me know. Otherwise, I hope this helps.

Why don’t you set the focus to the window (self.focus) or to the next enabled control, if any (self.focusnext)?

Thanks for the suggestions. It appears I did miss something.

Though, one might expect that disabling the listbox would be enough.


Yes, I agree. I’ve not had time to test yet, sorry.