I have a form with three listboxes on it. If the second or third listbox has focus and I select an item by clicking on it or by using the up or down arrow keys, it selects the new item correctly in the onClick event, but then focus always moves to the first of the three listboxes. This is ok when I am clicking with the mouse, but if I am using the up or down keys subsequent presses move the selection in the first listbox instead of the one that I was previously in.
I have tried to SetFocus to the listbox I want in its own OnClick routine, but focus still moves to the first listbox on the form.
Can anyone suggest how I can keep focus where I want it? The only alternative is to ignore keystrokes on this form and only allow selection with the mouse. This would not be too bad as these listboxes do not contain many items and there is not really any reason to step through the items rather than finding and clicking the one I need.