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

Home » Public Forums » archive » Re: Update text widget
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: Update text widget [message #65238 is a reply to message #65237] Thu, 19 February 2009 11:51 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
titan writes:

> what I have in mind is the following
> consider a simple process (for example a for cycle) I know that when
> it is finished I can communicate it to user writing
> test_1msg='process A finished'
> print,test_1msg
> but if I don't have any command line I would like to do the same
> updating my widget text from sensitive=0 to sensitive=1
> It could be handled with the SEND_EVENT keyword?

Yes, if you knew the identifier of you text widget. But,
in this case, if you know the identifier of your text widget
you don't even have to send an event. You can just change
the text widget yourself:

Widget_Control, textWidgetIdentifier, Sensitive=1

> Could you please suggest me something or some example to study??

Well, XMovie is a pretty simple example:

http://www.dfanning.com/programs/xmovie.pro

It uses a NO_COPY method for moving the "info" structure
around from the top-level widgets global storage space
to the storage place in the local event handler. Most
of us don't do things this way any more, but it won't
hurt you any to learn how this works. :-)

Nowadays, we put the "info" structure in a pointer:

ptr = Ptr_New({....}, /No_Copy)

And pass the ptr around without bothering about the NO_COPY
keyword. But that is a little more complicated, and you have
to know how to clean up the pointer when you exit your program,
etc. All of that can wait until you can get and respond to a
single event.

Cheers,

David

P.S. Do think hard about that book. It will save you
untold *hours* of frustration, I can guarantee you. :-)

--
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
Previous Topic: Re: Interpolating/gridding field reflectance spectra
Next Topic: file export to something vector-based?

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

Current Time: Fri Oct 10 16:54:51 PDT 2025

Total time taken to generate the page: 1.20149 seconds