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

Home » Public Forums » archive » Re: Widget Weirdness
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: Widget Weirdness [message #65654 is a reply to message #65646] Fri, 13 March 2009 08:45 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Well, this is a weird one. I've been able to duplicate
> the problem with other programs, just by changing
> the text of a label widget, but--naturally--when
> I make a simple test case nada. Going to be a long
> night, probably...

Yikes! Talk about weird.

I finally got my little test widget program to exhibit
the symptoms of this problem. It turns out that two
things are necessary for the problem to show itself.

Just to recap the problem. I have a centered widget.
If I move the widget off-center (on the display), then
create an event that changes the text of a label widget,
the entire widget jumps back to the center of the display.
This happens ONLY on UNIX machines.

As I say, there are two requirements for this to occur.

First, I have to locate the widget on the display using
the [XY]OFFSET keywords.

Widget_Control, tlb, XOFFSET=400, YOFFSET=400

It doesn't matter if I do this before or after the
widget is realized, or if I do it as shown or if I
do it in the TLB creation routine. It only matters
that I assign a location to the widget. It doesn't
matter if the widget is centered necessarily. The
widget will pop back to this original offset location,
whatever it happens to be.

Second, I have to use the UPDATE keyword to
turn updates off and on for the top-level base. In my
test program, the code looks like this:

Widget_Control, event.top, Update=0
Widget_Control, event.top, Update=1
Widget_Control, labelID, Set_Value=newText

If I don't do *both* of these things, my widget acts
like it is suppose to.

Do you think there is any chance anyone at ITTVIS will
believe me?

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mac Widget Limitation?
Next Topic: Double precision

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

Current Time: Fri Oct 10 09:09:10 PDT 2025

Total time taken to generate the page: 0.00540 seconds