[comp.windows.x] Motif Bug / BulletinBoard widget help

gpraman@sdrc.UUCP (raman srinivasan) (05/30/90)

I am trying to create a form using the BulletinBoard widget
with three buttons and two single line editable text fields.
One of the buttons is setup as the default (using XmNdefaultButton).
The functionality that I'm trying to have is hitting a RETURN in
either of the text fields should activate the default button
and invoke the relevant callbacks.  The way it behaves now is
hitting a RETURN before setting input focus to either text field
causes the default button to be activated, but if focus is set
to the text field, first, RETURN does not have any effect. 

This procedure (hitting RETURN while in text field) works fine
with the DEC widget set using a dialog box (DwtDialogBox & 
DwtNdefaultButton).

The default translations seem to be fine for the purpose.

Is it a bug in Motif or am I missing something ??

Thanks in advance, Raman

part of the source
------------------------------------------------------------------------------------
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include <Xm/BulletinB.h>
.
.
   Widget create;
   Arg arglist[10];
   int argcnt;
   /*
    * create bulletin board to be used as a container widget
    */
....
   XtSetArg (arglist[argcnt],XmNdialogTitle, ........
   dialog = XmCreateBulletinBoard (main_widget,"BB",arglist,argcnt);
   XtManageChild (dialog);

  /*  the text field  */

   filtxt = XmCreateText( dialog, "filtxt", arglist, argcnt );
   XtManageChild( filtxt );
   /*
    * Create push buttons
    */
   create = create_push_button( dialog, "Create", 256, 16,
               XmStringCreate("Create",XmSTRING_DEFAULT_CHARSET),
               create_cb, NULL);
   XtManageChild (create);
   /*
---->>>    * Set "Create" as the default button
    */
   XtSetArg( arglist[0], XmNshowAsDefault, 1);
   XtSetValues( create, arglist, 1);
--->   XtSetArg( arglist[0], XmNdefaultButton, create );
   XtSetValues( dialog, arglist, 1 );
.
.
------------------------------------------------------------------------------------