dymm@b.cs.wvu.wvnet.edu (David Dymm) (12/31/88)
I have the following application (using X11, R3): ------------------------------------------------ | command1 command2 command3 | |----------------------------------------------| | | | | |______________________________________________| The outside structure is a form widget. Inside that form are two more form widgets where the top form widget have three command widgets. My question is: when the user uses the window manager to resize the outside widget, how do I PREVENT the buttons from being resized??? I want the buttons to stay the same size -- if they get too small, they are unreadable. David Dymm Software Engineer ************************************* * Violence is the last refuge of * * the incompetent. * * Hardin * ************************************* USMAIL: Bell Atlantic Knowledge Systems, 145 Fayette Street, Morgantown, WV 26505 PHONE: 304 291-9898 (8:30-4:30 EST) USENET: {allegra,bellcore, cadre,idis,psuvax1}!pitt!wvucsb!dymm INTERNET: dymm@b.cs.wvu.wvnet.edu
swick@ATHENA.MIT.EDU (Ralph R. Swick) (01/04/89)
> The outside structure is a form widget. > Inside that form are two more form widgets where > the top form widget have three command widgets. > My question is: when the user uses the window manager > to resize the outside widget, how do I PREVENT the buttons > from being resized??? Specify ChainLeft for the values of XtNleft and XtNright for each of the Command widgets. You can do this in the resource file without touching the code.
dheller@cory.Berkeley.EDU (Dan Heller) (01/04/89)
In article <8901031619.AA00156@LYRE.MIT.EDU> swick@ATHENA.MIT.EDU (Ralph R. Swick) writes: >> My question is: when the user uses the window manager >> to resize the outside widget, how do I PREVENT the buttons >> from being resized??? > >Specify ChainLeft for the values of XtNleft and XtNright >for each of the Command widgets. You can do this in the >resource file without touching the code. I've been having a problem which is very similar to this. Instead of resizing the form, I just want to change the sensitivity of one of the command widgets. Altho I haven't tried your "solution" using resize events, your solution does not work with respect to the sensitive attributes. The scenario is similar: a form with three command widgets, all 150 pixels wide (random strings as labels). After you create these widgets, toggle the XtNsensitive attribute on one of the widgets. For some reason, the form seems to think that the widget needs resizing and it shrink's the width to the minimum according to the string. I tried using the suggestion above, but it didn't work. Dan Heller <island!argv@sun.com>
swick@ATHENA.MIT.EDU (Ralph R. Swick) (01/04/89)
Date: 4 Jan 89 07:34:32 GMT From: pasteur!cory.Berkeley.EDU!dheller@AMES.ARC.NASA.GOV (Dan Heller) The scenario is similar: a form with three command widgets, all 150 pixels wide (random strings as labels). After you create these widgets, toggle the XtNsensitive attribute on one of the widgets. For some reason, the form seems to think that the widget needs resizing and it shrink's the width to the minimum according to the string. Slightly different issue here. It's not the Form that's causing the problem but rather the Command (Label) itself. By default, every time you do a SetValues on a Command (Label), it will make a geometry request to be resized to it's optimal dimensions. There are two ways to disable this: the XtNresize resource in Command (Label), or the XtNresizable constraint resource in Form. The former is documented, the latter is mentioned but not well documented. Since the default value for the latter is to disallow geometry requests from the child, you must have already discovered it.