[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

253.0. "Can you record window positions and move them back?" by DRIFT::WOOD (Laughter - the best medicine) Mon Feb 20 1989 13:04

I have managed to customize my startup to put most things where I want them 
(like DECterms using CHILD).  After startup I sometimes need to move windows
temporarily, but would like an easy way to move them back.  An example might 
be an 80 character DECterm which is aligned on right side of the screen.  After
setting its width to 132 to see a wide document, I need to move the window over.
After setting the width back to 80, I would like an easy way to pop the window
back into its normal place.

Is there any easy way to do this?  Something like a program which would record
the current position of all or selected windows and then move them back on 
command?

Any ideas?

John

T.RTitleUserPersonal
Name
DateLines
253.1Create a little file and snap it backSEAN::DAVIDSONMon Feb 20 1989 14:0417
re: .0

First determine where the DECterm is at on the screen (you should have this
from CHILD) and then create a simple little file like RESET-DECTERM.DAT with
your cooridnates in it:

DECW$TERMINAL.x:	530
DECW$TERMINAL.y:	30

Then when you want to snap it back just do a Customize and then
Use Saved Settings from... and then give it the filename and it should
move it back to where you want it.  You can also have it resize the DECterm
if you want.


Sean

253.2Saving Application Setup ValuesMTA::WATSONWed Feb 22 1989 17:4921
    But how about a more general and elegant method?  
    
    I am trying to do the same thing for an application. 
    
    Upon leaving the application I getvalues on the width, heighth,x,y.
    I am using popupshells for about 10-20 windows.  I would like to
    be able to store these values so the application can start up the
    way the user left it.
    
    The width and height seem to be accurate but the x, y positions
    are not.
    
    How come the session manager does not update the x, y positions?
    
    Should I be using another method?
    
    Thanks.
    
    Jim Watson
                         

253.3ATSE::DAVIDSONWed Feb 22 1989 17:5611
    re: .-1
    
    I don't think there is any easy way to do this for DECterms.  I'm no
    X expert but maybe the title is something you could find walking
    through all the window id's that are create (like xtree example)
    and if you give each DECterm window a unique title you could get the
    window id and once you have that you should be able to do just about
    anything you want.
    
    Sean

253.4AITG::DERAMODaniel V. {AITG,ZFC}:: D'EramoWed Feb 22 1989 18:259
     re .2

     You might be finding the x and y positions of your widgets within
     their shells (or something like that), perhaps gettting x=0, y=0.
     You have to go up to the window that is a child of the window manager's
     "root" and get it's position to get useful x and y values.

     Dan