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

Home » Public Forums » archive » Re: Resetting a DRAW widget to have new size/scroll area...?
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: Resetting a DRAW widget to have new size/scroll area...? [message #3003] Tue, 01 November 1994 07:53 Go to previous message
8015 is currently offline  8015
Messages: 52
Registered: November 1993
Member
In article <Pine.SOL.3.91.941031170641.8872A-100000@chroma>,
Russ Welti <rwelti@chroma.mbt.washington.edu> wrote:
> I have an application with one main window, which has one
> drawing area, into which I TV images. Does anyone know:
>

...

> I have tried DESTROYING and rebuilding the draw widget, but with
> only partial success at best. This is probably what I would do in X
> Windows...
>

And more than likely the way to do it in IDL widgets, too.

> Does anyone know if it is even possible to destroy and replace widgets
> from a realized, event-looping application?

Yeah, it's very possible. It takes only a dozen lines of code or so to
destroy, rebuild it and tie it back into the application.

> When I do it, the window
> does a quick shrink and resize; but a tv to the new draw widget has
> no effect, and things get worse from there.

Sounds like you may have forgotten to "wset" the new window ID to the
new draw widget. A piece of code for doing that would be something
like:

Widget_Control, drawwin, Get_Value=wid
WSet, wid

If you don't mind showing a little code one or more of us can probably
straighten out the problem with less guesswork. Or you can email it if
you want a smaller audience.

>
> My interim working solution at the moment is to destroy the entire
> BASE widget and rebuild the app from scratch, as if it was the first
> invocation. This is a bit disconcerting, as the app disappears for a
> few seconds, and one wonders if it crashed... ;)

Would it make things easier if the drawing widget hierarchy were
separate from the rest of the interface? That's also possible to do.
That way you can destroy and rebuild the drawing hierarchy without the
rest of the interface being affected at all. I think it looks cleaner,
but it may not lend itself to your application.

Mike Schienle Hughes Santa Barbara Research Center
8015@sbsun0010.sbrc.hac.com 75 Coromar Drive, M/S B28/87
Voice: (805)562-7466 Fax: (805)562-7881 Goleta, CA 93117
[Message index]
 
Read Message
Read Message
Previous Topic: Bug in map_set IDL3.6.1?
Next Topic: VAX floats to IEEE (source code avail.)

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

Current Time: Wed Oct 08 15:33:31 PDT 2025

Total time taken to generate the page: 0.00497 seconds