staatsvr@asdcds.cds.wpafb.af.mil (Vern Staats; ASD/SCED;) (07/19/89)
Hello, X-Netters I've run into a bit of difficulty converting an X10R4 application to X11R3 under DEC Ultrix 3.0. I'm fairly new to using Xt and the Athena widget set (and even newer to usenet), so this may be a dumb question. Here's what I'm trying to do: +--------------------------------------+ | || | | +----------------------------------+ | | | | | ||, = | | ^ | | The double lines indicate | | | | | where I've chained a widget |=| <--canvas--> |=| to be a fixed distance from | | | | | the edge of the enclosing | | V | | Form widget. | | | | | +----------------------------------+ | | || | | +----------------------+ | | | button-box | | | +----------------------+ | | Form || | +--------------------------------------+ The "canvas" widget is a Label (for now) and should resize in conjunction with its parent Form. I'd like button-box to maintain a fixed size based on the font used in its command buttons. I've tried button-box as both a Box and a Form widget. In both cases it resizes when I resize its parent Form, even if I've set the XtNresizable attribute to false for button-box and the buttons inside it. Two questions: 1) Does XtNresizable really work? 2) Is there a way to force all buttons in a Box widget to stay on the same row? Just making the box wide enough (XtNwidth) doesn't seem to work. Thanks in advance. Note: If replying by mail, please edit the "To:" field to staatsvr@asd.wpafb.af.mil, our netnews system seems to be having an identity crisis. Boolean orthogonal(char *my_opinions, char *employer_opinions) {return(TRUE);} INET: staatsvr@asd.wpafb.af.mil /// Honey, I UUCP: nap1!asd!staatsvr \\\/// dereferenced Vern Staats, ASD/SCED, WPAFB OH 45433, 513-255-2714 \XX/ the kids
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (07/26/89)
[picture deleted] > The "canvas" widget is a Label (for now) and should resize in conjunction with > its parent Form. I'd like button-box to maintain a fixed size based on the > font used in its command buttons. I've tried button-box as both a Box > and a Form widget. In both cases it resizes when I resize its parent Form, > even if I've set the XtNresizable attribute to false for button-box and the > buttons inside it. Try setting the XtNleft and XtNright resources for the label to XtChainLeft, and the XtNtop and XtNbottom resources to XtChainBottom. This will keep it the same size. > Two questions: > 1) Does XtNresizable really work? Yes, but it is intended to be used by the form to determine whether or not to listen to resize requests from its children. Setting it to FALSE does not mean that the children will never be resized, it means that they can never ask to be resized. The form may do anything it wants to its children. > 2) Is there a way to force all buttons in a Box widget to stay on the same > row? Just making the box wide enough (XtNwidth) doesn't seem to work. Nope, use the Form or the VPaned. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213