Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
I want to create a non-resizeable popup attached dialog box with two widgets/gadgets inside it. Inside the ADB, I want a window, and below that a push button. I want them centered horizontally, which I can do easily. But, I want them spaced vertically as follows |------------------------| I want the space between the top and the | | <- window to be equal to the space between the | |--------------| | window and the button as well as the space | | | | between the button and the bottom. I want | | | | the dialog box to be the right size to fit | | | | around it's contents (without explicitly | | | | setting its width or height - so it will | |--------------| | look equally nice on 75 or 100 DPI systems) | | <- but margin width/height fields seem to have | |----| | no effect. and unless I explicitly set the | |----| | width and height of the adb, its dimensions | | <- turn out too small, and you can not see all |------------------------| of its contents. If I attach the button to the bottom of the ADB and set the height of the ADB explicitly, Unless I get it perfect, the button will be stretched vertically. I do not want this to happen. Can anyone help me out with some suggestions? Thanks. -Jonathan
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1010.1 | For non-user-resizable box, bottom attach not necessary | R2ME2::OBRYAN | When in doubt, let the user decide. | Fri Jun 23 1989 15:22 | 29 |
re:.0 -< Help with popup ADBs needed >- >|------------------------| I want the space between the top and the >| | <- window to be equal to the space between the >| |--------------| | window and the button as well as the space >| | | | between the button and the bottom. I want >| | | | the dialog box to be the right size to fit >| | | | around it's contents (without explicitly >| | | | setting its width or height - so it will >| |--------------| | look equally nice on 75 or 100 DPI systems) >| | <- but margin width/height fields seem to have >| |----| | no effect. and unless I explicitly set the >| |----| | width and height of the adb, its dimensions >| | <- turn out too small, and you can not see all >|------------------------| of its contents. >If I attach the button to the bottom of the ADB and set the height of the ADB >explicitly, Unless I get it perfect, the button will be stretched vertically. If the button is stretching, then you must be making both a bottom AND a top attachment on the button. (Making a bottom and top attachment on any widget overrides its height argument.) Since you don't wish to allow the user to resize the popup_adb, you needn't specify a bottom attachment at all for the button; just make the button top attach to the window widget, and set the default vertical offset of the adb to match the offset between the window and the button. (Default vertical offset in this case will essentially function as 'margin_height' [which does not work in ADBs].) I am assuming you have give an explicit height to the window widget. |