[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

2322.0. "Help Shell Move and Resize" by SUOSW4::GEISELHART () Wed Feb 21 1990 10:28

Help,

I have got a toplevel widget, created by Xtappcreateshell, and I would like to
move and resize it. Does anybody knows if this is possible??

Thank You
Bianca
T.RTitleUserPersonal
Name
DateLines
2322.1setvaluesTOOLEY::B_WACKERWed Feb 21 1990 11:151
Have you tried setvalues on DwtNx,DwtNy, etc?
2322.2XtMoveWidget and XtResizeWidgetOPHION::MIKEYMike YangWed Feb 21 1990 13:431
    Have you tried XtMoveWidget and/or XtResizeWidget?
2322.3You can always use XlibKAOU35::DLEROUXWed Feb 21 1990 14:3422
    
    If you can't get it done with the other suggestions you can always
    use xlib and set WM Hints.
    For some reason XtResize and XtMove didn't work for me so 
    I used the following.
                
    void set_size( Widget w, int x, int y )
    {
    	XSizeHints xsh;
    
    	xsh.x = x;
    	xsh.y = y;
    	xsh.flags = USPosition|PPosition;
    	XSetNormalHints( XtDisplay( w ), XtWindow( w ), &xsh );
    }            
    
    Check out the documentation on Window Manager Hints for more info.
    
    Dan
    
    
    
2322.4According to the Intrinsics "bible"LEOVAX::TREGGIARIWed Feb 21 1990 17:105
    The "official" Intrinsics directive is to use XtSetValues on the shell
    to change the XtNx and XtNy, and to use XtSetValues on the shell's
    child to change XtNwidth and XtNheight.
    
    Leo
2322.5"official things" never works !SUOSW4::GEISELHARTThu Feb 22 1990 03:0311
Thanks for the hints, I had tried to use XtSetValues before, but it doesn't 
work. When I set XtNallowShellResize true, the positions DwtNx,y don't 
change and if I try to resize a child, the main window, the program never 
returns from xtsetvalues.I tried to set XtNallowShellResize before creation 
and after, also to set the positions before and after, allways when I have 
set XtNallowShellResize to true the program hangs in the next XtSetValue 
on the top-Window or on a child.

Is there any help out there???

Thank You Bianca
2322.6VIA::FINNEGANAll of the best intentions are less than one good act.Fri Mar 09 1990 11:4115
The cardfiler used use

        XtSetArg (args [xtnumber], XtNx, x); xtnumber++;
        XtSetArg (args [xtnumber], XtNy, y); xtnumber++;
        if (xtnumber > 0) XtSetValues (cardparent, args, xtnumber);

to set the position of the card window if it was not defined by the user in the
defaults file.

This worked in V1.0 (VMS 5.1) and broke in V2.0 (VMS 5.3 and later).  I think I
qared this (I at leasted worked with Mike on it) but it was never fixed.

Is there a work around?

Neal
2322.7Set the shell's x and y alsoDECWIN::KLEINFri Mar 09 1990 13:5512
>Is there a work around?

I think that setting the x and y on the parent of the main window (its shell)
IN ADDITION TO setting the x and y of the main window will work under both
V1 and V2.  This is what I've resorted to.  In V2, setting just the shell's
x and y works, and in V1, setting the main window's x and y works.

In fact, when my programs start up, they do an XtSetValues of x and y of
the shell to whatever the x and y of the main window is.  This seems to
work under both versions and is pretty "transparent".

-steve-
2322.8XSetNormalHints works under MWM too!ELMST::DELISEWed Mar 28 1990 12:077
    FYI -
    
    The XSetNormalHints approach in .3 has one advantage: it works correctly
    with Motif *and* DECwindows window managers, on PMAX and VMS. The other
    approach (0.7) doesn't move the window under Mwm.
    
    Chris