comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » window position / screen size
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
window position / screen size [message #142] Tue, 02 April 1991 23:28 Go to next message
hofer is currently offline  hofer
Messages: 16
Registered: April 1991
Junior Member
Is there a way to get the size of the screen (not the size of the drawing
window) in pv~wave. And can you get the position of a window. I want to use a
popup menu in a window. If the user moves the window it should popup next time
where the user left it last time. I'm using the X driver on a VAXstation
running VMS. Our pv~wave version is 3.01.

Thanks in advance

Remo
--
RFC822: <hofer@urz.unibas.ch>
X.400: S=hofer;OU=urz;O=unibas;P=SWITCH;A=ARCOM;C=CH
Re: Window position [message #6293 is a reply to message #142] Wed, 22 May 1996 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Matthew Larkum <larkum@pyl.unibe.ch> wrote:
>
> Does anyone know how to find the position of an IDL window?
> That is, obtaining the information you set with:
>
> window, xpos=200, ypos=200
>
> back from the system and hopefully containing any user adjustments
> in the mean time.
>

One way is to use the widget creation routines to create the window:

b = widget_base( xoffset=xpos, yoffset=ypos )
d = widget_draw( b, xsize=512, ysize=512 )
widget_control, b, /realize
widget_control, d, get_value=window_id

Then you can use WIDGET_CONTROL to get info on the top-level-base:

widget_control, b, tlb_get_offset=xy_pos ; xy_pos=lonarr(2)
widget_control, b, tlb_get_size=xy_size ; xy_size=lonarr(2)

You can also get info using the GEOMETRY keyword to WIDGET_INFO().

You can reposition the widget with TLB_SET_OFFSET keyword to
WIDGET_CONTROL().

I never use IDL's WINDOW command because you have very little
control once you've made the window. It would be simple to make
a procedure to use the widget-creation routines to make a new
window and return the TLB widget ID (maybe as keyword). I do
something similar to this in all of my programs.

Hope this helps.

Dave Foster
foster@bial1.ucsd.edu
Re: Window position [message #6297 is a reply to message #142] Tue, 21 May 1996 00:00 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Matthew Larkum (larkum@pyl.unibe.ch) wrote:
: Does anyone know how to find the position of an IDL window?
: That is, obtaining the information you set with:

: window, xpos=200, ypos=200

: back from the system and hopefully containing any user adjustments
: in the mean time.

device, get_window_position=win_pos
print, win_pos

You'll need to make some corrections for the window trim to get a new
window in exactly the same position.

: Thanks,

You're welcome.

Peter

--
--------------------------------
Peter Webb, HP Labs Medical Dept
E-Mail: peter_webb@hpl.hp.com
Phone: (415) 813-3756
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Window position
Next Topic: Re: efficient use of call_external

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:42:23 PDT 2025

Total time taken to generate the page: 1.03727 seconds