[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

1342.0. "resizing main_window" by STARV6::PAGE () Wed Aug 30 1989 11:54

I have a main window widget defined as:
 
 		   root
 		    |
 	       main_window
 	         |     |
           menu_bar   work_area
                       |    |
              detached db  detached db

If I resize the detached dbs connected to the work_area using the XtSetValues
and then do an XtGetValues on the height and width of the main window, the 
values are not updated. It's only when I do an XtRealizeWidget, that the 
main_window values are updated.

How do I get the main_window's height and width values updated without doing 
a realize widget?

T.RTitleUserPersonal
Name
DateLines
1342.1Shell Widget doesn't ResizeEXLIB::DLUGOSZNever try to prove what nobody doubtsWed Aug 30 1989 16:4618
    If I understand what you're attempting to do...
    
    main_window has as its parent a shell widget (commonly called
    top_level). When you realize the widget instance tree the shell
    widget will make itself the same size as its managed child. After
    the shell has been created it will (by default) not resize itself.
    (Applications should not, by convention, change the size of their
    toplevel windows on their own accord. It's up to the user to do
    that.)
    
    There is a resource in the shell widget that you can set to allow
    the shell to resize itself (XtNallowShellResize). Once again
    though, you really shouldn't use it.
    
    If this isn't what you were trying to do.....oops
    
    Ron

1342.2Who knows best?SDSVAX::SWEENEYHoney, I iconified the kidsThu Aug 31 1989 13:0715
    re: .1
    >>    (Applications should not, by convention, change the size of their
    >>    toplevel windows on their own accord. It's up to the user to do
    >>    that.)
    
    The "user can do that" by instructing the application's UI to add more
    visual information to the window with the resulting height and width
    being correct with respect to the data domain.  Ditto window placement. 
    Sometimes the application knows best in the regard.
    
    On the other hand, raise, lower, iconify, and de-iconify are functions
    that I think should be performed exclusively through user manipulation
    of the window manager-supplied decoration.  That's just my opinion
    though.

1342.3How about that nasty Window Manager?EXLIB::DLUGOSZNever try to prove what nobody doubtsThu Aug 31 1989 13:1915
    re: .2
    >> The "user can do that" by instructing the application's UI to add more
    >> visual information to the window with the resulting height and width
    >> being correct with respect to the data domain.  Ditto window placement. 
    >> Sometimes the application knows best in the regard.
       
    Agreed. Didn't say I necessarily liked the convention...Have to
    watch out though since some nasty window manager (in the act of
    enforcing its layout policy) may decide to overrule the resize
    request.
    
    Ain't policies wonderful? 
    
    Ron

1342.4LEOVAX::TREGGIARIThu Aug 31 1989 13:4910
> How do I get the main_window's height and width values updated without doing 
> a realize widget?

I can't think of any way.  But if what you really need is to get the
height and width before *displaying* the main window, you can do that.
Just do not XtManage the main window widget until you want it displayed.

Leo

1342.5DECterm goes its own way...HANNAH::MESSENGERBob MessengerFri Sep 01 1989 16:0417
Re: .1

>    (Applications should not, by convention, change the size of their
>    toplevel windows on their own accord. It's up to the user to do
>    that.)
>    
>    There is a resource in the shell widget that you can set to allow
>    the shell to resize itself (XtNallowShellResize). Once again
>    though, you really shouldn't use it.
    
In case someone is wondering, DECterm always turns on allowShellResize.  I
suppose it could be argued that it should only do this if Auto Resize Window
is on.  I don't think people would like the results if DECterm "followed the
rules" and didn't resize itself.

				-- Bob