
On 9/7/07, Ken Perry <whistler@blinksoft.com> wrote:
I have just looked through the documentation for a way to set the initial focused control but have not found one. I could create a focus event that said if the dlg gets focus then focus the one I want but I am wondering if there is another way like for example a :default-focus for the dlg? I add a listbox to the dialog then an edit box and then 3 buttons. It seems no matter if I add the edit box first or last or in the middle some where The dialog when shown always seems to focus the list box which I don't understand why that is.
Hi Ken. Try calling gfw:give-focus on the desired control in your initialization of the dialog. One thing that I haven't decided whether I'm happy about is the behavior that occurs when any control has the focus and one switches to another window and then back. I find that I have to manually set the focus back, when one might expect that when the window is made active again, that the control that previously had focus would remember that state. I need to do some research and see if this is just normal Win32 behavior, and if it is, then I might think about providing some mechanism to handle this automatically. Your input is welcome. -- Jack Unrue