Xref: utzoo comp.unix.i386:6571 comp.windows.x.motif:39 Path: utzoo!attcan!uunet!cdss!lyons From: lyons@cdss.UUCP (Don R. Lyons x4811) Newsgroups: comp.unix.i386,sco.opendesktop,comp.windows.x.motif Subject: Problem with Motif form widget in SCO-ODT Message-ID: <78@cdss.UUCP> Date: 6 Jul 90 19:02:32 GMT Reply-To: lyons@cdss.UUCP (Don R. Lyons x4811) Followup-To: comp.unix.i386 Organization: ARINC Research Corp., CDSS Group, Annapolis, MD Lines: 62 Can anyone tell me why the form widget does not size to fit button1, button2, button3 under SCO-ODT? When this application is displayed only button1 and button2 are visible. All three are visible if don't set XmNbottomAttachment for wbutton[2]. Please email me, I have a product deadline I am trying to meet. thanx -don #include #include #include #include char *buttons[] = { "button1", "button2", "button3" }; void main( argc, argv) int argc; char **argv; { Widget toplevel, form, wbutton[5]; int i, n; Arg wargs[10]; toplevel = XtInitialize( argv[0], "Formtest", NULL, 0, &argc, argv); form = XtCreateManagedWidget( "form", xmFormWidgetClass, toplevel, NULL, 0); for ( i = 0; i < XtNumber(buttons); i++) wbutton[i] = XtCreateWidget( buttons[i], xmPushButtonWidgetClass, form, NULL, 0); XtManageChildren( wbutton, XtNumber(buttons)); n = 0; XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetValues(wbutton[0], wargs, n); n = 0; XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_WIDGET);n++; XtSetArg(wargs[n], XmNtopWidget, wbutton[0]); n++; XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetValues(wbutton[1], wargs, n); n = 0; XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_WIDGET);n++; XtSetArg(wargs[n], XmNtopWidget, wbutton[1]); n++; XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetArg(wargs[n], XmNbottomAttachment,XmATTACH_FORM); n++; XtSetValues(wbutton[2], wargs, n); XtRealizeWidget(toplevel); XtMainLoop(); } -- Don R Lyons Any opinions expressed are my own. Arinc Research Inc uucp : uunet!cdss!lyons CDSS, Mail Stop 1249 voice: 301 266 4811 2551 Riva Road Annapolis , MD 21401 fax : 301 266 2047