Re: Re-sizing Draw Widgets in Linux [message #31395] |
Tue, 09 July 2002 10:08 |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
"M. Katz" <MKatz843@onebox.com> wrote in message
news:4a097d6a.0207081626.36e40dd8@posting.google.com...
> Here's a widget programming issue I'm having with Linux (IDL 5.5) that
> is not a problem on the Mac (IDL 5.4).
>
> I'm trying to dynamically re-size the screen area of a widget_draw
> widget in response to the user changing the size of the top-level
> base. (This happens to be a widget for drawing with object graphics
> [graphics_level = 2], but I'm not sure that is an important detail.)
Yes, it is. :-)
> I issue this command:
>
> widget_control, windowID, DRAW_XSIZE = xx, DRAW_YSIZE = yy
>
> and yes, the screen size of the widget changes perfectly.
> HOWEVER, the newly added areas of the window cannot be drawn-to. They
> remain black even though the rest of the window behaves just as it
> should.
This is a bug in IDL and would also be present on other Unix/X platforms.
The root of the problem is that the backing-store pixmaps are not being
resized when the widget is resized.
The problem is fixed for the next release of IDL.
Mark Hadfield also reported this to me. (Mark, it is fixed! :-) ) And I
think Ronn Kling was hitting this too.
One workaround worth trying is to set RETAIN=1 on the draw widget, which
avoids the backing-store issue, but you then lose the benefits of backing
store.
> As I said above, this works _perfectly_ on a Mac (no surprise there),
> and it's exactly the same code on both machines.
It is also not a problem on Windows.
> Am I going to have to destroy and re-create the widget_draw window to
> make this work?
You could and it may be a good approach if you must use RETAIN=2.
> Thanks,
> M. Katz
|
|
|