[comp.windows.x] help with widgets

thor@csd.uwo.ca (Jim Thorsley) (02/28/90)

I'm writing a widget application which displays a daytimer page on the screen.
I'm using the Paned widget which contains 30 Box widgets. Each box contains
a label, an ascii string, and a button. When the user types into the string
it will wrap to multiple lines when needed and the string widget will grow
vertically causing the box to grow. What I want is the paned widget to also
grow to accomodate the expaned box. But, no, it decides to shrink the last
box instead. I've set *allowResize to True, and *resizable to True. No go.
I've even set up a callback on the ascii source widget, check the box size
and set the paned widget's height if the box changes size. But, the paned
widget will not resize and the height resource doesn't change. Any ideas
on how to get a complex widget to grow? Is this a bug or a feature?

Many thanks in advance..

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (03/03/90)

> Jim Thorsley writes:

> ...What I want is the paned widget to also grow to accomodate the expaned box.
> But, no, it decides to shrink the last box instead. I've set *allowResize to 
> True...

The R4 widget should do what you ask.  If a child of the Pane asks for a resize
and the Pane allows it to resize (XtNallowResize is TRUE) the it performs
the following:

1) Resize all children to their "preferred size".

2) Attempt to resize the Pane to accomadate the new size change.

And if necessary:

3) Forcibly resize the other children according to the rules outlined
   in section 6.4.4 of the R4 Athena Widget Documentation.

If you can send me an example program of different behavior then I will take a
look at it.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213


------- End of Unsent Draft

------- End of Forwarded Message