Setting focus Programmatically

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Setting focus Programmatically

Submitted by orank on Tue, 09/30/2003 - 13:41.

Hi,

In simple words
I have a popup question dialog that I use a lot.
Some times I want the ?Close? button to be in focus
and some times I want to ?OK? button to be in focus.

I know how to set the focus in the first time using ?XmNinitialFocus? but How do I change the focus later on ?
I looked at the books and did not find the answer.

Some more Details
I have a FormDialog Widget with 4 pushButton (button1 to button4) widgets in it.
One of the pushbutton widgets gets the focus (highlighted) when the mouse enters the dialog.
The button that receives the focus is the one I defined using
XtVaSetValues(formDialog,
XmNinitialFocus, button1,
NULL);

Every time I Unmanage/Manage the dialog -> button1 receives the focus.

When I manage the dialog again (after it was unmanaged for some time)
I would like to be about to change the push button widget that receives the focus.

How do I do that ?

Thanks in advance
oran

Wed, 10/01/2003 - 16:41#1

Wed, 10/01/2003 - 16:41#1

ICS_support

Setting focus Programmatically

See XmProcessTraversal

Wed, 10/01/2003 - 16:42#2

Wed, 10/01/2003 - 16:42#2

ICS_support

Setting focus Programmatically

See XmNdefaultButton