home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / motif / 8445 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  2.6 KB

  1. Xref: sparky comp.windows.x.motif:8445 comp.windows.x.intrinsics:734
  2. Newsgroups: comp.windows.x.motif,comp.windows.x.intrinsics
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!usc!rpi!batcomputer!cornell!uw-beaver!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!scott
  4. From: scott@ee.ualberta.ca (Scott Stephens)
  5. Subject: Resizing Widgets within Code
  6. Message-ID: <1993Jan8.173014.23896@kakwa.ucs.ualberta.ca>
  7. Sender: news@kakwa.ucs.ualberta.ca
  8. Nntp-Posting-Host: scooter.ee.ualberta.ca
  9. Organization: University Of Alberta, Edmonton Canada
  10. Distribution: na
  11. Date: Fri, 8 Jan 1993 17:30:14 GMT
  12. Lines: 52
  13.  
  14.  
  15. I'm having trouble with some geometry management of Motif widgets. First 
  16. let me describe the hierarchy of the widgets. I have the following.
  17.  
  18.       topLevelShell
  19.             |
  20.             v
  21.        mainWindow
  22.             |
  23.             v
  24.        panedWindow
  25.             |
  26.             v
  27.           form
  28.             |
  29.             v
  30.  scrolledWindow & scale           separated horizontally (scrollers are 
  31.             |                     managed but unmapped)
  32.             v
  33.       drawingArea
  34.  
  35. plus some menus which are unimportant to this discussion. I have chosen 
  36. this so that the scale and scrolled window can be resized automatically 
  37. when changing the pane sizes, with the scale acting something like a 
  38. scroller, but not changing the viewing area, just changing a gain 
  39. parameter. but I also want to be able to add copies of the form on down to 
  40. the panedWindow. I also want to limit the height of the window to the size 
  41. of the screen
  42.  
  43. If I add a copy of the form on down which would exceed the height of the 
  44. screen, I would like to be able to have the program resize all the forms 
  45. in the panes to be roughly the same size (give or take a pixel or two). 
  46. The new form gets added ok, and at the default height, but one of the 
  47. other forms gets resized to XmNpaneMinimum (set at 50 pix).
  48.  
  49. So here's the problem. After adding a new form, I have tried to adjust the 
  50. sizes of each form, but this doesn't seem to resize them properly, and the 
  51. drawingArea doesn't always get resized to match the size it should be 
  52. within the scrolled window. I try resizing with XtMakeResizeRequest, 
  53. followed by a second request if the result is XtGeometryAlmost (with the 
  54. returned values of course).
  55.  
  56. My question is, in what order should I make these requests, and when? I 
  57. could probably hack it together (as I did before I had the form and scale 
  58. in here), but I'd rather do it properly so I don' run into problems.
  59.  
  60. Your help in this matter would be greatly appreciated, and thanks in 
  61. advance to any and all who respond
  62.  
  63. R. Scott Stephens
  64. scott@ee.ualberta.ca
  65.  
  66.