home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.motif
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!skiing.cis.ohio-state.edu!rubin
- From: rubin@skiing.cis.ohio-state.edu (Daniel Rubin)
- Subject: Simple Motif Questions...
- Message-ID: <1993Jan10.004818.2849@cis.ohio-state.edu>
- Sender: news@cis.ohio-state.edu (NETnews )
- Organization: The Ohio State University Dept. of Computer and Info. Science
- Date: Sun, 10 Jan 1993 00:48:18 GMT
- Lines: 44
-
- While making my first Motif application I encountered a couple of non-critical
- problems that I was never able to solve.
-
- First how do you go about centering buttons in a rowcol widget? I have three
- buttons in a rowcol widget created with the following resources
-
- XtSetArg (args[cnt], XmNbottomAttachment, XmATTACH_FORM); cnt++;
- XtSetArg (args[cnt], XmNrightAttachment, XmATTACH_FORM); cnt++;
- XtSetArg (args[cnt], XmNleftAttachment, XmATTACH_FORM); cnt++;
- XtSetArg (args[cnt], XmNentryAlignment, XmALIGNMENT_CENTER); cnt++;
- XtSetArg (args[cnt], XmNisAligned, True); cnt++;
- XtSetArg (args[cnt], XmNorientation, XmVERTICAL); cnt++;
- XtSetArg (args[cnt], XmNnumColumns, 3); cnt++;
- XtSetArg (args[cnt], XmNpacking, XmPACK_COLUMN); cnt++;
- XtSetArg (args[cnt], XmNadjustMargin, True); cnt++;
- XtSetArg (args[cnt], XmNadjustLast, False); cnt++;
- buttonarea = XtCreateManagedWidget("buttonarea", xmRowColumnWidgetClass,
- mainarea,args,cnt);
-
- The rowcol widget is attached to a form widget that I am using as my "main"
- widget for the application. Inside this widget are three push button widgets.
- All I want is these three buttons to be uniform in width to fill out the
- rowcol, but as it is the buttons are only as wide as the button with the
- largest label and they start of the left side of the rowcol leaving a gap on
- the right side?
-
- Secondly, I have a list widget as a child of a rowcol widget that is a child
- of a form widget. I am having trouble getting the list widget to resize
- to the size of the of the rowcol that is attached to the form?
-
- Finally the most annoying problem has been trying to figure out how to put
- a frame around a widget that is attached to a form. It seems like when I
- attach a frame widget to a form and have something like a rowcol widget as
- the child of the frame things get really screwed up? If I create a rowcol
- widget and attach it to its parent which is a form widget how can I put a
- frame around the rowcol, all I want in a outline around the rowcol's children?
-
- Thanks for any help - Dan
-
- --
-
- Daniel Joseph Rubin rubin@cis.ohio-state.edu
-
- GO BENGALS! GO BUCKS!
-