Re: changing size of the draw widget [message #5053] |
Fri, 29 September 1995 00:00 |
nmw
Messages: 18 Registered: January 1995
|
Junior Member |
|
|
In article <449jd0$qrr@news.tamu.edu>,
Geetha Pathi <gpathi> writes:
>> Try using the /TLB_SIZE_EVENTS keyword of WIDGET_BASE and then writing
>> an event handler to process these base widget resize events.
>> Use WIDGET_CONTROL to resize the draw widget.
>
> Hi,
> I would like to know how you can resize the draw widgets using
> WIDGET_CONTROL procedure.
>
> Thanks,
> Geetha Pathi.
> (gpathi@loanstar.tamu.edu).
>
WIDGET_CONTROL is not a guaranteed way of changing the size of a widget.
Under X it sends a resize event and the widget attempts to change its
size. This is only a *request* to the X window manager - the window
manager does not have to honour it. If you try it using IRIX 5.2
and IDL 4.0 you will find that it doesn't work - what it does is to resize
the vertical size to 0.
The method I use is to destroy the old draw widget and create a new
one of the correct size.
--
Nigel Wade, System Administrator, Ionospheric Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
|
|
|
Re: changing size of the draw widget [message #5069 is a reply to message #5053] |
Tue, 26 September 1995 00:00  |
Geetha Pathi
Messages: 2 Registered: September 1995
|
Junior Member |
|
|
> Try using the /TLB_SIZE_EVENTS keyword of WIDGET_BASE and then writing
> an event handler to process these base widget resize events.
> Use WIDGET_CONTROL to resize the draw widget.
Hi,
I would like to know how you can resize the draw widgets using
WIDGET_CONTROL procedure.
Thanks,
Geetha Pathi.
(gpathi@loanstar.tamu.edu).
|
|
|
Re: changing size of the draw widget [message #5090 is a reply to message #5069] |
Thu, 21 September 1995 00:00  |
zawodny
Messages: 121 Registered: August 1992
|
Senior Member |
|
|
In article <43pssb$g3j@ncar.ucar.edu> Charlie Zender <zender@ncar.ucar.edu> writes:
> i'm simply wondering how to get the size of my graphics to change with the size
> of the drawing window that they reside in. i create a base widget
> (a separate x-window) for the drawing, and then i make a draw
> widget as a child of the base widget, specifying an initial size with the
> [xsize,ysize] keywords to the widget_draw() routine. these initial
> x and y sizes are what is reported by the !d.x_size, !d.y_size variables
> forever after, even if the user changes the size of the actual x-window.
> so how do i find out the size of the x-window, so that i can reconfigure
> the draw widget? or is there a better way of doing this?
Try using the /TLB_SIZE_EVENTS keyword of WIDGET_BASE and then writing
an event handler to process these base widget resize events. Hint:
Keep track of the old size and assume that the difference between it
and the new size is what you need to change the draw widget by. Use
WIDGET_CONTROL to resize the draw widget. All of this assumes that
the layout of any of the other widgetry around the draw widget does
not change it's geometry in response to the resize event. OH, you will
also have to redraw and graphics that might have bee in the old draw
widget as they will not automatically strecth to fit the new size.
Best of luck
--
Dr. Joseph M. Zawodny KO4LW NASA Langley Research Center
E-mail: J.M.Zawodny@LaRC.NASA.gov MS-475, Hampton VA, 23681-0001
|
|
|