[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

450.0. "Style Question" by HGOVC::KENBERKUN (Klaatu Barato Nikto) Wed Mar 22 1989 06:14

    I have a question about DECwindows Style.
    
    My application displays a graphic picture.   The picture displayed
    varies in size.  Should the application resize the main window to
    display the whole picture, or should I assume a default size and
    allow the user to resize the window automatically?
    
    I will in anycase provide scrollbars, in case the user makes the
    window smaller.
    
    Second question:  If I do resize the mainwindow, then how do I do
    it?  I've tried XtResizeWindow and XtSetArg and I can't resize my
    mainwindow widget.  Perhaps this is forbidden.
                      
    I can make my working window smaller, but that's kind of silly as
    it leaves funny blank areas between it and the edges of the mainwindow.
    I can neither shrink nor expand my mainwindow.
    
    It seems to be me it might be convenient to have a window adjust
    itself to the right size.  But I'm open to argument...
    
    Ken B.
    

T.RTitleUserPersonal
Name
DateLines
450.1Passive windows, active user...TBD1::BURLEIGHDave, DECwindows TrainingWed Mar 22 1989 06:428
    Proper style is to let the user handle any necessary resizing.
    XtSetValues on the main window has no effect because, by default,
    the shell widget ignores geometry requests from its child. You
    can override this by setting XtNallowShellResize to True on the
    shell widget, but it breaks the Style Guide rules.
    
    Dave

450.2Who's in control?DECWIN::KLEINWed Mar 22 1989 13:5018
>>    Proper style is to let the user handle any necessary resizing.
>>    XtSetValues on the main window has no effect because, by default,
>>    the shell widget ignores geometry requests from its child. You
>>    can override this by setting XtNallowShellResize to True on the
>>    shell widget, but it breaks the Style Guide rules.

Although proper style may be to let the user handle resizing, that doesn't
mean that the user shouldn't be able to resize the window indirectly
through an action taken within the application.  For example, I see nothing
wrong with an application having a menu entry for "Make window big enough
to show the whole picture".  If they select that menu entry, then they are
resizing the window voluntarily.  Clearly, the user is still in control.

Requiring the user to diddle the window manager's resize button is not
the only "stylish" way to let the user resize (or move) windows.

-steve-

450.3Other examples too -- DECtermROBOT::ENDSLEYMJ Endsley, SWS @ St. LouisWed Mar 22 1989 18:168
    Another example of where it makes sense for the application to perform
    the resize on its own is illustrated by DECterm and its response when
    VMS processes a SET TERMINAL/PAGE=xx/WIDTH=yy command.


    Mike Endsley
    SWS @ STO

450.4PSW::WINALSKIPaul S. WinalskiWed Mar 22 1989 21:5516
Instead of setting the height and width attributes on the main window widget,
try setting them on the application shell widget returned by XtInitialize().
This should then cause the application shell widget to send configuration
requests (or geometry requests, or whateveritis) to its children, including
your main window.

In my application, I am doing this by having the main window contain only one
thing (aside from the menu bar):  an attached dialog box.  I then attach the
scroll bars to the bottom and right edges of the dialog box, and my graphics
window widget to the top and left of the dialog box, the top of the bottom
scroll bar, and the left of the right scroll bar.  When the shell widget is
resized, either by application request or by the user, the graphics window
grows or shrinks accordingly.

--PSW

450.5Argh...HGOVC::KENBERKUNKlaatu Barato NiktoThu Mar 23 1989 05:172
    Question continued in not 463...