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

Home » Public Forums » archive » Re: Problems with draw_xsize keyword in widget_control
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Problems with draw_xsize keyword in widget_control [message #5574 is a reply to message #5571] Tue, 09 January 1996 00:00 Go to previous message
David S. Foster/Admin is currently offline  David S. Foster/Admin
Messages: 14
Registered: May 1995
Junior Member
ldorffne@fbgeo1.tuwien.ac.at (Lionel Dorffner) wrote:
>
> I have problems with the 'draw_xsize' and 'draw_ysize' keywords in
> widget_control. As the manual says those keywords can be used to change the
> width and height of the drawable area for scrolling draw widgets. With the
> keywords 'scr_xsize' and 'scr_ysize' I only can change the viewport size.
>
> Example (see also Program-Code below):
> If I have a scrolling draw widget with a size of 500 and a scroll_size of 300
> I can display a 500x500 image and use the scrollbars to move around. If now I
> want to load an image with 600x600 pixels I have to enlarge the viewport size
> using the command 'widget_control, widget_id, scr_xsize=600, scr_ysize=600'.
> But also I now have a larger viewport the drawable area is still 500x500. So I
> want to use the command 'widget_control, widget_id, draw_xsize=600,
> draw_ysize=600' to also enlarge the drawable area. But the result is
> ablolutely not what I expected and what I wanted.

The order of widget_control calls you used is:

WIDGET_CONTROL, event.id, scr_xsize=anz*100 ;set new screen_size
WIDGET_CONTROL, event.id, scr_ysize=anz*100

WIDGET_CONTROL, event.id, draw_xsize=anz*100 ;set new graphic region
WIDGET_CONTROL, event.id, draw_ysize=anz*100

I don't think you want to use the SCR_XSIZE keyword since that
changes the actual SCREEN dimensions of the draw widget. If you
want to change the size of the graphics window to allow for
bigger images, and keep the viewport the same size, then just
use the DRAW_?SIZE keyword after you've created the scrollable
draw widget.

I have to relearn these keywords periodically as they are somewhat
confusing. For scrollable draw widgets:

DRAW_?SIZE : Change the size of the graphics region of a draw widget.

?SIZE : Change the viewport size of a draw widget.

SCR_?SIZE : Change the screen dimensions of a draw widget.

Dave Foster
UCSD Brain Image Analysis Lab
foster@bial6.ucsd.edu
[Message index]
 
Read Message
Read Message
Previous Topic: EPS printouts from IDL 4.0.1
Next Topic: Re: Looking for a book on idl

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

Current Time: Sun Oct 12 03:52:42 PDT 2025

Total time taken to generate the page: 0.88201 seconds