|
NAMEXmtSetInitialFocus() - set the widget to receive the initial keyboard focus in a dialog.SYNOPSIS#include <Xmt/Xmt.h>
void XmtSetInitialFocus(Widget dialog, Widget initial) ARGUMENTSINPUTS
DESCRIPTIONXmtSetInitialFocus() 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 complicated. SEE ALSOChapter 8, Utility Functions.
Visit the GSP FreeBSD Man Page Interface. |