mag@genrad.com (Michael A. Gray) (02/24/89)
Background: X11R2, Xt intrinsics, Hp widgets. Problem: When I add another widget (e.g a XwpushbuttonWidgetClass) to a already realized parent using XtCreateWidget the change in geometry needed does not bubble up to the top level shell. the widget tree has the top level shell, as returned by XtInitialize. Inside that is a bulletinboard widget. The bboard has 3 buttons. When I add the fourth button and then call XtManageChildren the bboard is resized correctly, but not the toplevel shell. After looking at the code for XtManageChildren this is because there is a check for already managed children. Because the bboard is already managed, it's size change is not noted by the toplevelshell. How do I get around this problem?? Thanks in advance, Michael Gray GenRad Inc. 300 Baker Ave. Concord, MA 01742 (508) 369-4400 x2681 - or - mag@genrad.com
ben@hpcvlx.HP.COM (Benjamin Ellsworth) (02/25/89)
Do you have "*allowShellResize: True" in your .Xdefaults file? ----------------------------------------------------------------------- Benjamin Ellsworth | ben%hp-pcd@hp-sde.sde.hp.com | INTERNET Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP 1000 N.E. Circle | (USA) (503) 750-4980 | FAX Corvallis, OR 97330 | (USA) (503) 757-2000 | VOICE ----------------------------------------------------------------------- All relevant disclaimers apply. -----------------------------------------------------------------------
mayer@hplabsz.HPL.HP.COM (Niels Mayer) (02/25/89)
In article <17668@genrad.UUCP> mag@genrad.UUCP (Michael A. Gray) writes: >Background: X11R2, Xt intrinsics, Hp widgets. > >Problem: When I add another widget (e.g a XwpushbuttonWidgetClass) >to a already realized parent using XtCreateWidget the change in >geometry needed does not bubble up to the top level shell. > I noticed the same problem in my widget interpreter shell using the R2 HP Xw and Xt -- since this program allows me to interactively access and change the layout and actions of widgets, it really stresses the widgets more than your average compiled widget program. I recently recompiled my program with the R3 Xw (pathes for R2-Xw --> R3-Xw were recently posted to this newsgroup) and the R3 Xt shipped form MIT. Using this seemed to fix a whole lotta problems that I'd been having due to widget bugs (failure to resize correctly, weird memory allocation errors in XtSetValues, etc, etc). Unfortunately, it's also introduced some weird problems stemming from the use of XtAddInpput that I'm still trying to work out. So give the new R3 Xw + R3 Xt a try. It seems to work well. -- Niels.
diamant@hpfclp.SDE.HP.COM (John Diamant) (02/26/89)
> Problem: When I add another widget (e.g a XwpushbuttonWidgetClass) > to a already realized parent using XtCreateWidget the change in > geometry needed does not bubble up to the top level shell. > > How do I get around this problem?? You need to set the allowShellResize resource on the toplevel shell widget to true. Presumably, the reason for this resource is to avoid excess geometry negotiation with a window manager and possibly surprising results of the application changing it's size once the window has already been created. That resource won't affect user-requested changes in size (via the window manager), but will affect the program's ability to change it's toplevel window once the window has been realized. For efficiency reasons, it's best to do as little geometry negotiation as possible after the realize (move as much as possible before the realize), but there are times when this is impractical or impossible. John Diamant Software Engineering Systems Division Hewlett-Packard Co. ARPA Internet: diamant@hpfclp.sde.hp.com Fort Collins, CO UUCP: {hplabs,hpfcla}!hpfclp!diamant