Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!agate!ucbvax!osf.org!wwang From: wwang@osf.org ("Weidong Wang from OSF") Newsgroups: comp.windows.x.motif Subject: Re: RESIZE_GROW Message-ID: <9104242214.AA01659@osfsun> Date: 24 Apr 91 15:14:47 GMT References: <910424110104.20520@sun.alfalfa.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 32 Kee wrote: > > > > Another feature that apparently is not supported is an interface > > between the main window and the form/bulletin board to manage the > > scroll bars. Currently if you set RESIZE_ANY and grow the window > > using the handles, the form does not grow with the main window parent. > > I'm not sure if this is what you're refering to, but I had a problem > where I never wanted the child widget (a Table in this case) to be > smaller than the clip area of a scrolled window. > > The hack to make this happen is to take the parent of the widget (which > will be an XmDrawingArea, since that's what XmScrolledWindow reparents > your widget to when you make it a child of an AUTOMATIC scrolled window) > and add a resize callback. The callback can then check the size of > your widget, compare it to the size of the drawingarea, and do whatever's > appropriate. > > The only thing you need to watch out for then is if the children of > your widget force it to be some other size that you don't want. That's > where something like RESIZE_GROW comes in handy. In the case of Table > I wanted a constant width and a varying height, so I had to add a > resizeWidth and resizeHeight resource so that I could constrain it to > ignore child requests in one direction or another. > The current version of Motif does not support resizeLogicallyWidthParent. Kee gave a work around to do it yourself. Of course, it would be nice to have it. Send in an enhancement request.