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 #65237 is a reply to message #65232] Thu, 19 February 2009 12:32 Go to previous messageGo to previous message
T.H. is currently offline  T.H.
Messages: 13
Registered: December 2008
Junior Member
On Feb 19, 1:10 pm, titan <thunder...@inwind.it> wrote:
> Hi J.H.,
> excuse me if I was too cryptic in my previous message.
>
>
>
>> 1) I'm not sure where your events are supposed to be coming from.
>> Since all of your text widgets are unsensitive they can't produce any
>> events and you have no buttons to click, slider to mover , etc.
>
> What I want to do is to change the status of the text widget I create
> from SENSITIVE = 0 to SENSITIVE=1 after a series of calcolus is
> performed. For example consider a simple for cycle
>
> FOR i = 0, 5000 DO BEGIN
> Print, i
> ENDFOR
>
> once this cycle is finished I would like to communicate it to the
> event handler and change the status of the corresponding row making it
> sensitive
> I hope now I was clearer than before
>
>> 2) In the event handler, you are using variables that you defined in
>> the my_widget_text but have not passed in any way to the event
>> handler.  The event handler doesn't know what text_1 or text_1_msg
>> are.  One common way to handle this type of issue is to create a
>> pointer to a structure that contains all of the information that your
>> event handler might need.  Then set the uvalue of you top level base
>> to that pointer.  I prefer to do this kind of stuff as an object.
>> This allows you to define the widgets as member data and have access
>> to all of them throughout the event handler.
>
> unfortunately I don't know much about pointer that's why I was trying
> to use the keyword GET_UVALUE but now I understand that it is
> incorrect :o(

I think that in this case you don't need an event handler but could
simply change the sensitivity in the main code something like:

Build GUI just like you are doing now.
Perform Calculation step 1
WIDGET_CONTROL,text1,/sensitive
Perform Calculation step 2
WIDGET_CONTROL,text2,/sensitive
...
...

Or better yet consider using the a progressbar (such as the one
readily avialable at David Fanning's website).

When I started with IDL someone handed me David Fanning's book. It
saved me a lot of frustration.
[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 May 22 16:08:26 PDT 2026

Total time taken to generate the page: 2.40357 seconds