Re: tooltip of draw widget acts like a eraser?! [message #40061] |
Sun, 11 July 2004 12:46 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
biophysics writes:
> I have a widget program which runs fine with idlde. But if I run the
> program in a plain idl session, say from idlwave, My tooltip of draw
> widget eats contents of draw widget wherever it goes. Any idea of
> what's going on?
The problem is that whoever you've given responsibility
for window damage repair is shirking their duty. (If your
household is like mine, the names of your teenage
children might spring immediately to mind, but that
can't be right! They are only responsible for keeping
the windows *clean* and even that is almost too much for
them.) In any case, you have to track the problem down.
The technical name for window damage repair is
"backing store". Someone (or some thing, depending
upon your own personal view of computers) is responsible
for maintaining the backing store. Responsibility is
generally assigned with the RETAIN keyword to a WINDOW
or DRAW_WIDGET command. Most often the window manager
is assigned this task, but window managers don't *have*
to do it and sometimes they won't just out of peevishness.
(They can almost all be coaxed to, but you have to
remember secret codes and magical incantations and
sometimes is all just a bit too much, if you know what
I mean.) If you want IDL to do it, set the RETAIN keyword
to 2.
Sometimes a draw widget will want to handle this task
itself. (Object graphics draw widgets are often written
this way.) If that's the case, you will have to figure
out how the program re-draws itself when it needs to
(typically some kind of EXPOSE event) and apply this
to the window when you exit your tooltip.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|