How to set focus on a control/gadget?

BlitzPlus Forums/BlitzPlus Programming/How to set focus on a control/gadget?

laughing_man(Posted 2015) [#1]
I have a listbox, a textbox and some buttons in a window. There are 2 problems:-
[1]The thing is that when the window opens, the user needs to click on a control in order to start using the rest of them.....tab through them. How can I set focus on a control automatically as the window opens.
[2]While using tab to traverse the various controls, the listbox does not get focus. What to do?


_PJ_(Posted 2015) [#2]
ActivateGadget
ActivateWindow

You need to be aware of which windows/gadgets are enabled, since they will all be potentially accessible and the system will be checking events for them all.

I also recommend,m maybe hiding some of those that aren't required (such as on other tabs) when switching.


_PJ_(Posted 2015) [#3]
test
Sorry , had trouble posting in the other section and wanted to check....


laughing_man(Posted 2016) [#4]
To _PJ_,
Sorry I did not reply. My PC was old and died and I had other personal problems. Got a new PC recently. I shall try what you recommended. Thank you.