Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!atha!aunro!alberta!brazeau.ucs.ualberta.ca!unixg.ubc.ca!ucs.ubc.ca!lindholm From: lindholm@ucs.ubc.ca (George Lindholm) Newsgroups: comp.windows.x.motif Subject: XmForm help Message-ID: <1991Jun26.234931.12224@unixg.ubc.ca> Date: 26 Jun 91 23:49:31 GMT Sender: news@unixg.ubc.ca (Usenet News Maintenance) Organization: Computing Services, University of British Columbia Lines: 59 Nntp-Posting-Host: greve.ucs.ubc.ca I trying to get XmForm to accept a particular layout that I want between a ScrolledWindow and a PushButton but when I define the layout XmForm complains and produces a scrambled layout. Here's the layout that I want: +-------------------XmForm--------------------------+ | | |+---------------------+ | || | | || | | || ScrolledWindow | other widgets | || | | || | | |+---------------------+ | | +-----+ | | |PushB| | | +-----+ | +---------------------------------------------------+ The constraint that I want is that the bottom of the ScrolledWindow is to tied to the top of the PushButton and that the right side of the PushButton is to be tied to the right side of the ScrolledWindow. When I use the following code: n = 0; XtSetArg(args[n], XmNleftAttachment, (XtArgVal) XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, (XtArgVal) XmATTACH_POSITION); n++; XtSetArg(args[n], XmNrightPosition, (XtArgVal) 50); n++; viewport[file1] = XmCreateScrolledWindow(outer_widget, "view1", args, n); . . . n = 0; XtSetArg(args[n], XmNtopAttachment, (XtArgVal) XmATTACH_NONE); n++; XtSetArg(args[n], XmNleftAttachment, (XtArgVal) XmATTACH_NONE); n++; XtSetArg(args[n], XmNbottomAttachment, (XtArgVal) XmATTACH_FORM); n++; scan_widget[file1] = XmCreatePushButton(outer_widget, "scan1", args, n); XtVaSetValues(viewport[file1], XmNbottomAttachment, (XtArgVal) XmATTACH_WIDGET, XmNbottomWidget, (XtArgVal) scan_widget[file1], NULL); XtManageChild(viewport[file1]); XtVaSetValues(scan_widget[file1], XmNrightAttachment, (XtArgVal) XmATTACH_OPPOSITE_WIDGET, XmNrightWidget, (XtArgVal) viewport[file1], NULL); XtManageChild(scan_widget[file1]); I get: Warning: Name: form Class: XmForm Circular dependency in Form children. Where is the circular dependency? And can I do what I want with XmForm?? Thanks -- George Lindholm phone: (604) 822-4375 University Computing Services, UBC fax: (604) 822-5116 6356 Agricultural Road, Vancouver, B.C., Canada internet: lindholm@ucs.ubc.ca V6T 1Z2 bitnet: USERGNL@UBCMTSG