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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Problems with draw_xsize keyword in widget_control [message #5571] Wed, 10 January 1996 00:00
Ken Knighton is currently offline  Ken Knighton
Messages: 44
Registered: May 1995
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.

The draw_xsize and draw_ysize keywords worked for me under HP_UX/IDL 4.0.

To the best of my knowledge, the following table shows the actual keywords that
must be used to accomplish various sizing operations on a draw widget. As you
can see, the keywords for creating the widget using WIDGET_DRAW and changing it
using WIDGET_CONTROL are inconsistent. The documentation does a poor job of
making this clear.

WIDGET_CONTROL WIDGET_DRAW
-------------------------------------------------------
Entire Widget | SCR_X/YSIZE | SCR_X/YSIZE
--------------|-------------------|--------------------
Viewport | X/YSIZE | X/Y_SCROLL_SIZE
--------------|-------------------|--------------------
Canvas | DRAW_X/YSIZE | X/YSIZE

As you can see from the above table, the keywords are inconsistent in their
usage.

If the draw widget is created with scroll bars, then it seems to want them
there (or at least the space for them) even if the viewport and canvas are the
same size so that they are no longer needed. There is no way to turn this off
without destroying and recreating the draw widget. Note that
destroying/recreating isn't necessarily a bad way to go.

My experience is primarily on HP-UX/X-Windows/IDL 4.0

I hope this helps.

Ken Knighton knighton@gav.gat.com knighton@cts.com
Fusion Division
General Atomics
San Diego, CA
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 19:50:58 PDT 2025

Total time taken to generate the page: 0.00679 seconds