Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtSetInitialFocus(3)	    Library Functions Manual	   XmtSetInitialFocus(3)

NAME
     XmtSetInitialFocus() - set the widget to receive the initial keyboard focus
     in a dialog.

SYNOPSIS
     #include <Xmt/Xmt.h>

     void XmtSetInitialFocus(Widget dialog, Widget initial)

ARGUMENTS
     INPUTS

	  dialog An XmBulletinBoard widget or a subclass; generally the toplevel
		 widget of a dialog box.

	  initialThe  descendant of dialog that it to receive the keyboard focus
		 when dialog first pops up or other wise receives the focus.

DESCRIPTION
     XmtSetInitialFocus() specifies that the widget initial should be given key-
     board 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 di-
     alog. That resource is new with 1.2, however, so in Motif	1.1,  XmtSetIni-
     tialFocus()  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 un-
     predictable delay between the time a window is mapped and the time it actu-
     ally  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 ALSO
     Chapter 8, Utility Functions.

Xmt				   Motif Tools		   XmtSetInitialFocus(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtSetInitialFocus&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help