Is there a way to give a control focus?

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?

In reply to 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!