Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!samsung!emory!cambridge.apple.com!bloom-beacon!convex.UUCP!root From: root@convex.UUCP (Superuser) Newsgroups: comp.windows.x Subject: Lost mail for you Message-ID: <9006071727.AA15075@sushi> Date: 7 Jun 90 17:27:18 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 86 From pescadero.stanford.edu!expo.lcs.mit.edu!xpert-mailer Thu May 31 14:56:31 1990 remote from convex Received: by sushi (5.51/7.0) id AA08567; Thu, 31 May 90 05:42:06 CDT Received: by convex.COM (5.51/4.7) id AA17266; Thu, 31 May 90 05:41:56 CDT Received: from Erebus.Stanford.EDU by uxc.cso.uiuc.edu with SMTP (5.62+/IDA-1.2.8) id AA18245; Thu, 31 May 90 05:42:05 -0500 Received: from Hanauma.Stanford.EDU by erebus.Stanford.EDU with TCP; Thu, 31 May 90 03:31:22 PDT Received: by hanauma.stanford.edu (5.51/7.0) id AA08537; Thu, 31 May 90 03:41:52 PDT Received: from EXPO.LCS.MIT.EDU by Pescadero.Stanford.EDU (5.59/25-eef) id AA16261; Thu, 31 May 90 03:40:07 PDT Received: by expo.lcs.mit.edu; Thu, 31 May 90 03:06:00 EDT Received: from bloom-beacon.MIT.EDU by expo.lcs.mit.edu; Thu, 31 May 90 03:05:47 EDT Received: by bloom-beacon.MIT.EDU (5.61/25-eef) id AA26632; Thu, 31 May 90 02:11:50 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for xpert@expo.lcs.mit.edu (xpert@expo.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 30 May 90 12:26:58 GMT From: convex!uunet.uu.net!gpraman%sdrc (raman srinivasan) Organization: SDRC, Cincinnati Subject: Motif Bug / BulletinBoard widget help Message-Id: <1436@sdrc.UUCP> Sender: convex!expo.lcs.mit.edu!xpert-request To: xpert@expo.lcs.mit.edu 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 #include #include . . 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 ); . . ------------------------------------------------------------------------------------