Manual Reference Pages - XMTSETINITIALFOCUS (3)
XmtSetInitialFocus() - set the widget to receive the
initial keyboard focus in a dialog.
void XmtSetInitialFocus(Widget dialog,
An XmBulletinBoard widget or a subclass; generally
the toplevel widget of a dialog box.
The descendant of dialog that it to receive the
keyboard focus when dialog first pops up or other
wise receives the focus.
XmtSetInitialFocus() specifies that the widget initial should
be given keyboard focus when dialog is next given the
focus-generally this means when it is first popped up.
Dialog boxes that use the XmBulletinBoard widget or a subclass
such as the XmForm or XmtLayout widgets will give the initial
focus to the default button by default. This is not always
desirable, as with the XmPromptDialog where initial focus
should be set to the internal text widget.
In Motif 1.2, this function simply sets the XmNinitialFocus
resource of dialog. That resource is new with 1.2, however,
so in Motif 1.1, XmtSetInitialFocus() must arrange to assign
the focus itself. This cannot be done until the dialog
widget has received focus itself, and it cannot be done right
after popping up the dialog because the window manager
imposes an unpredictable delay between the time a window is
mapped and the time it actually appears and receives focus.
So in Motif 1.1, XmtSetInitialFocus() registers a focus
callback which registers a timer procedure which sets the focus
to the specified initial widget. XmtSetInitialFocus() exists
as a utility routine precisely because this process is so
Chapter 8, Utility Functions.
|Xmt ||XMTSETINITIALFOCUS (3) ||Motif Tools |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.