Text and losing focus

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

Questions about motif? Contact us

2 posts / 0 new
Last post
Text and losing focus

Submitted by Anonymous (not verified) on Fri, 06/15/2012 - 12:07

When clicking on option menu after modifying Text field, it does not call TextFocusOut. Basically, it does not know that the focus of the text field should be lost by now.
It calls TextFocusOut when clicking on text field or tab after modifying a text field.
Option menu is created as following:
BulletinBoard=XtVaCreateManagedWidget(OptionMenuName,xmFormWidgetClass,
Parent,
XmNnavigationType,XmNONE,
0);
TmpOption=XmVaCreateSimpleOptionMenu(BulletinBoard,OptionMenuName,Label,
0, 0,NULL,
XmNtraversalOn,True,
XmNmarginHeight, 0,
XmNmarginWidth, 0,
XmNspacing, 0,
XmNentryCallback,Call,
XmNuserData,(XtPointer)this,
0);
What can I do to recognize that the text has lost focus if I click on option menu?
Thank you
‹ Set background Pixmap for list and text field of a combo box toolbars ›

clamb

Mon, 06/07/2004 - 21:48#1

Just a thought...

I think that there is a callback called XmNfocusCallback and set a flag to true. You could use it to say that the textbox has received focus. Then when the callback on the button is called check the flag to see if it is true do what needs to be done accordingly.

However, using focus routines is not always the best way. I would set the flag back to false once I have done any processing related to the flag.