Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!oliveb!amdahl!JUTS!duts!gjf00 From: gjf00@duts.ccc.amdahl.com (Gordon Freedman) Newsgroups: comp.windows.x.motif Subject: How do I get window to resize? Message-ID: <33iu02bN07Of01@JUTS.ccc.amdahl.com> Date: 30 Apr 91 02:16:07 GMT Sender: netnews@ccc.amdahl.com Reply-To: gjf00@DUTS.ccc.amdahl.com (Gordon Freedman) Organization: Amdahl Corporation, Sunnyvale CA Lines: 32 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? I have a window with two rowcols in it. They start out with XmNpacking set to PACK_TIGHT, but I want to be able to change to PACK_COLUMN with 2 for XmNnumColumns. I defined a callback for a toggle button to toggle between the two states. In the callback, I set XmNpacking for the two rowcols. Unfortunately, I can't figure out how to get the window to resize itself. I don't want to have to figure out how big the window should be and use something like XtResizeWidget. I don't explicitly specify any sizes at all for the widgets in the window, Motif (or Xt or X) does the right thing based on attachments and number of characters/columns/etc, so I don't get involved at all trying to figure out the size of any widgets/forms/windows when creating and realizing the window and its widgets. I have tried many things, such as unmanaging and remanaging all of the widgets from the rowcols on up to the main window (just under the top level shell), and unrealizing and then realizing the top level. All this does is make the window flash funny, and then make the user have to resposition the window. The rowcols change from one column to two (from TIGHT to COLUMN) and vice versa, but the window size stays the same. Note that the rowcols shrink vertically when going from PACK_TIGHT to PACK_COLUMN, but grow horizontally. They do the opposite when going the other way. Any help would be greatly apreciated. Thanks in advance. -- Gordon Freedman: gjf00@duts.ccc.amdahl.com Disclaimer: My opinions! Not my employers!