home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / motif / 8466 < prev    next >
Encoding:
Text File  |  1993-01-09  |  2.6 KB  |  55 lines

  1. Newsgroups: comp.windows.x.motif
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!skiing.cis.ohio-state.edu!rubin
  3. From: rubin@skiing.cis.ohio-state.edu (Daniel Rubin)
  4. Subject: Simple Motif Questions...
  5. Message-ID: <1993Jan10.004818.2849@cis.ohio-state.edu>
  6. Sender: news@cis.ohio-state.edu (NETnews        )
  7. Organization: The Ohio State University Dept. of Computer and Info. Science
  8. Date: Sun, 10 Jan 1993 00:48:18 GMT
  9. Lines: 44
  10.  
  11. While making my first Motif application I encountered a couple of non-critical
  12. problems that I was never able to solve.
  13.  
  14. First how do you go about centering buttons in a rowcol widget?  I have three
  15. buttons in a rowcol widget created with the following resources
  16.  
  17.   XtSetArg (args[cnt], XmNbottomAttachment, XmATTACH_FORM); cnt++;
  18.   XtSetArg (args[cnt], XmNrightAttachment, XmATTACH_FORM); cnt++;
  19.   XtSetArg (args[cnt], XmNleftAttachment, XmATTACH_FORM); cnt++;
  20.   XtSetArg (args[cnt], XmNentryAlignment, XmALIGNMENT_CENTER); cnt++;
  21.   XtSetArg (args[cnt], XmNisAligned, True); cnt++;
  22.   XtSetArg (args[cnt], XmNorientation, XmVERTICAL); cnt++;
  23.   XtSetArg (args[cnt], XmNnumColumns, 3); cnt++;
  24.   XtSetArg (args[cnt], XmNpacking, XmPACK_COLUMN); cnt++;
  25.   XtSetArg (args[cnt], XmNadjustMargin, True); cnt++;
  26.   XtSetArg (args[cnt], XmNadjustLast, False); cnt++;
  27.   buttonarea = XtCreateManagedWidget("buttonarea", xmRowColumnWidgetClass,
  28.                      mainarea,args,cnt);
  29.  
  30. The rowcol widget is attached to a form widget that I am using as my "main"
  31. widget for the application.  Inside this widget are three push button widgets.
  32. All I want is these three buttons to be uniform in width to fill out the
  33. rowcol, but as it is the buttons are only as wide as the button with the
  34. largest label and they start of the left side of the rowcol leaving a gap on
  35. the right side?  
  36.  
  37. Secondly, I have a list widget as a child of a rowcol widget that is a child
  38. of a form widget.  I am having trouble getting the list widget to resize 
  39. to the size of the of the rowcol that is attached to the form?
  40.  
  41. Finally the most annoying problem has been trying to figure out how to put
  42. a frame around a widget that is attached to a form.  It seems like when I
  43. attach a frame widget to a form and have something like a rowcol widget as
  44. the child of the frame things get really screwed up?  If I create a rowcol
  45. widget and attach it to its parent which is a form widget how can I put a
  46. frame around the rowcol, all I want in a outline around the rowcol's children?
  47.  
  48. Thanks for any help                                               - Dan
  49.  
  50. -- 
  51.  
  52.              Daniel Joseph Rubin     rubin@cis.ohio-state.edu 
  53.      
  54.                        GO BENGALS!      GO BUCKS!
  55.