Re: [Fxruby-users] setFocus
Status: Inactive
Brought to you by:
lyle
From: jeroen <je...@fo...> - 2004-05-24 03:09:54
|
On Saturday 22 May 2004 01:39 am, Hal Fulton wrote: > Thanks, Lyle... I'll cc Jeroen and on this then. > > I'll leave it on fxruby-users in case someone else > can learn from it. > > Lyle Johnson wrote: > > On May 17, 2004, at 4:12 PM, Hal Fulton wrote: > >> Are there general rules for setFocus that I need to know? > > > > Umm, maybe? ;) > > > > I would start out by reading Jeroen's documentation on how keyboard > > focus handling works in FOX: > > > > http://www.fox-toolkit.com/focus.html > > > > and then follow up with him (or on the foxgui-users mailing list) if > > that still leaves unanswered questions. > > Jeroen: > > I'm trying to understand this sentence: > > "setFocus() puts a widget into the focus chain. If the toplevel > widget had the REAL focus from the window system [the window > manager only assigns keyboard focus to a toplevel window], then > setFocus() generates a SEL_FOCUSIN message; note that in the > process of child->setFocus(), the whole chain is built up by upward > recursion, and the child does not become switched into the focus > chain until the parent is also." > > Does this mean I can't do a setFocus on a modal dialog box or its > contents? What is meant by a toplevel window -- one that stands alone, > or an actual main window? Anything derived from FXTopWindow, in other words, a direct child of the root window that's not a popup. > All I'm trying to do is display a modal dialog box and give the focus > to the single text field in it. Nothing I try works. Perhaps one of your buttons has the BUTTON_INITIAL and BUTTON_DEFAULT options? Normally, such a button attracts the focus when the dialog is first shown... Regards, Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:50 12/11/2003 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |