WILD@EMBL.BITNET (David Wild) (03/11/91)
Hello, I am writing an application using Motif 1.0 and have a problem with the text widget. The resource XmNeditMode is defined as XmSINGLE_LINE_EDIT, and, according to the documentation, the Return key should be bound to the activate() procedure. However, when I press Return in the text widget I do not get an activate callback. Can anyone help? David Wild
jmg10@ruts.ccc.amdahl.com (Jean M. Goldschmidt) (03/12/91)
To address the problem of why the return key is not bound to activate(): (This may solve your problem!) I ran into the same problem several months ago. I was using the text widget as a child of a BulletinBoard widget. Now, the BulletinBoard widget has a resource called XmNdefaultButton which can be set to a button in the BulletinBoard which will be activated when the Return key is pressed. So, even if press Return inside the text widget, even though it is supposed to invoke the activate() procedure, it won't happen because the BulletinBoard owns the Return key's binding. (did I say that right??) What I did to solve this problem is set the XmNdefaultButton resource on the BulletinBoard to be a button which will pass the value inside the text widget to the appropriate callback. (There may be a way to ignore this XmNdefaultButton stuff but I am unaware of it!) Hope this helps,