Is there a way to give a control focus?
tony
In a listbox control's action procedure I create and then kill another control.
After that the listbox has lost focus, so keyboard input is halted.
Is there a way to avoid the listbox losing focus? Can I kill and redraw a control from within its own action procedure?
I think this requires judicious use of the ControlUpdate, DoUpdate, and ModifyControl ... activate operations.
Could you create the control with disable=1 so that it is effectively hidden on the panel?
July 30, 2020 at 05:23 am - Permalink
In reply to I think this requires… by jjweimer
I've experimented and it doesn't seem to help if I enable rather than create.
More specifically, anything I do involving a titlebox control takes focus away from the listbox. Nothing that I do with the listbox regains focus.
So if I enable, change the title of, or move a titlebox, focus is lost. Moving the listbox doesn't grab focus back!
July 30, 2020 at 05:31 am - Permalink
In reply to I've experimented and it… by tony
ah, i see now that ModifyControl activate is what i'm missing! Thank you!
July 30, 2020 at 05:33 am - Permalink