Re: Focus rectangle won't show
- Posted by DerekParnell (admin) Dec 12, 2011
- 2753 views
Is there a way to force windows to show a focus rectangle?
The problem is that when control is given to the user for the first time, the window that has focus is Main_Window. This happens because you first open the child window then you open the main_window, and the most recently opened window gets the focus.
And that means that the TAB key will shift focus amongst the controls in the Main_Window (because it has focus) and not any others. This gives the appearance that the Child Window has no focus rectangle.
So, instead of using the openWindow() routine in the manner you have now, try this instead ...
procedure ActivateMain(integer self, integer event, sequence parms) openWindow({Child_Window, Button_One}, Normal) end procedure setHandler(Main_Window, w32HActivate, routine_id("ActivateMain"))
This code will open the Main window first, which causes the Activate event to fire, thus opening the child window next, leaving focus with the child window.