Initial focus


#1

What’s the proper way to set which component has focus after the constructor has completed. I know it cannot be set in the constructor, since something changes the focus after construction is complete and the window is made visible (ie at the start of any program the top level window has initial focus).

There must be some easy way to change this?


#2

I don’t know if it is the ‘right’ way, but I noticed that if I set the tab order for the sub components, everything worked at expected if I just mouse clicked anywhere on the parent component. So I just did a postCommandMessage at the end of the constructor and a grab Focus call in the commandMessage method.

Sorry if that isn’t clear, I’m not sure how else to explain it.


#3

Wow thanks!. So unobvious