updating a value in a window [message #42080] |
Thu, 16 December 2004 08:25  |
Francois L.
Messages: 19 Registered: December 2004
|
Junior Member |
|
|
Hello,
I have a loop in which computation is performed. I want to display the
progress.
------------------------------------------------------------ ---------------------
tlb = Widget_Base(Column=1, TLB_Frame_Attr=1,title='Work in progress...')
text1 = widget_text(tlb, value='...... Percent completed ......',xsize=40)
x = 25
x = string(x) +' %'
text2 = widget_text(tlb, value=x)
CenterTLB, tlb
Widget_Control, tlb, /Realize
------------------------------------------------------------ ---------------------
How can I update the x value in the text2 widget while keeping the same top
level base ?
I know I should not call widget_control all over the loop but...
Thank you,
Fran�ois.
|
|
|
Re: updating a value in a window [message #42143 is a reply to message #42080] |
Tue, 21 December 2004 12:19  |
Francois L.
Messages: 19 Registered: December 2004
|
Junior Member |
|
|
Ok.
I got it.
Thanks.
"Francois L." <fleduc@lycos.com> wrote in message
news:1103659332.489752@news.drenet.dnd.ca...
> In your, code (http://www.dfanning.com/programs/progressbar__define.pro),
> I obtain compilation errord at lines 575 and 634.
> Both errors concern:
>
> IF self.fast THEN TVLCT, FSC_Color(self.color, /Triple), self.colorindex
> ^
>
> TVLCT, FSC_Color(self.color, /Triple), self.colorindex
> ^
>
> What can it be ?
>
> Thank you,
>
> Francois.
>
> "David Fanning" <davidf@dfanning.com> wrote in message
> news:MPG.1c2bc6614c2e691d9898bf@news.frii.com...
>> Francois L. writes:
>>
>>> I have a loop in which computation is performed. I want to display the
>>> progress.
>>> ------------------------------------------------------------ ---------------------
>>> tlb = Widget_Base(Column=1, TLB_Frame_Attr=1,title='Work in
>>> progress...')
>>> text1 = widget_text(tlb, value='...... Percent completed
>>> ......',xsize=40)
>>> x = 25
>>> x = string(x) +' %'
>>> text2 = widget_text(tlb, value=x)
>>> CenterTLB, tlb
>>> Widget_Control, tlb, /Realize
>>> ------------------------------------------------------------ ---------------------
>>>
>>> How can I update the x value in the text2 widget while keeping the same
>>> top
>>> level base ?
>>> I know I should not call widget_control all over the loop but...
>>
>> You could have a look at my ProgressBar code and see
>> how it is done there:
>>
>> http://www.dfanning.com/programs/progressbar__define.pro
>>
>> Cheers,
>>
>> David
>>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
>
|
|
|