Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!uakari.primate.wisc.edu!crdgw1!uunet!olivea!oliveb!amdahl!JUTS!duts!gjf00 From: gjf00@duts.ccc.amdahl.com (Gordon Freedman) Newsgroups: comp.windows.x.motif Subject: Re: How do I get window to resize? Message-ID: <58VF02pl07y301@JUTS.ccc.amdahl.com> Date: 3 May 91 19:11:19 GMT References: <33iu02bN07Of01@JUTS.ccc.amdahl.com> <4639@gmdzi.gmd.de> Sender: netnews@ccc.amdahl.com Reply-To: gjf00@DUTS.ccc.amdahl.com (Gordon Freedman) Organization: Amdahl Corporation, Sunnyvale CA Lines: 30 In article <4639@gmdzi.gmd.de> berlage@gmdzi.gmd.de (Thomas Berlage) writes: >In article <33iu02bN07Of01@JUTS.ccc.amdahl.com>, gjf00@duts.ccc.amdahl.com (Gordon Freedman) writes: >> Does anybody know how request or force a window to resize itself to something >> sensible after changing the layout of some of the widgets in the window? >Whether resizing is allowed is controlled by all manager widgets in the >hierarchy. First of all you have to set XmNallowShellResize of the toplevel >shell to True. Other manager widgets may have similar resources. > >Thomas Berlage (berlage@gmdzi.gmd.de), GMD, Germany First, thanks to Thomas for the answer to my question. Experimenting with using XmNallowShellResize, I found that I only needed to specify it for the top level shell widget (which I created with XtVaAppInitialize). I was able to do a SetValues after creating the top level shell to set this. I did not have to set it for any other widgets, and the heierarchy was: ToplevelShell -> XmMainWindow -> XmFrame -> XmForm -> XmRowColumn(2) | +------> XmMenuBar -> CascadeButtons The two XmRowColumns were what I was changing the layout for, I found that if I didn't unmanage them before I changed their layout, the window got larger than it needed to, as it was resized after the first layout was changed, and then resized again after the second layout was changed. Unmanaging them and then Managing them after changing both layouts caused the toplevel shell to only resize once, which was what I wanted. -- Gordon Freedman: gjf00@duts.ccc.amdahl.com Disclaimer: My opinions! Not my employers!