Re: WIDGET_CONTROL, /HOURGLASS ? [message #13229] |
Fri, 30 October 1998 00:00 |
Eric Frans
Messages: 13 Registered: October 1998
|
Junior Member |
|
|
> Eric Frans (epfrans@west.raytheon.com) writes:
>
>> I recently discovered the ability IDL 5.1 has to change the cursor to an
>> hourglass, which is particularly helpful during time consuming processes
>> like reading or writing large files. So I decided to use the line:
>> WIDGET_CONTROL, /HOURGLASS
>> in a procedure before reading in potentionally huge input files. The
>> hourglass cursor appeared fine, but then when I launched a widget from
>> the procedure after the input file had been read, the hourglass cursor
>> didn't change back to normal, so I wasn't able to modify the widget
>> entries at all. Is there some sort of clear command I need?
David Fanning wrote:
>
> You could try this:
>
> Widget_Control, Hourglass = 0
>
> Sometimes we forget that /Keyword means Keyword = 1. :-)
Sorry, I forgot to mention I tried that also and it didn't work. I also
failed to mention that after I read the file (and before launching the
widget) I used the CURSOR procedure allow selection of a point on a
plot. The CURSOR procedure seems to be causing the HOURGLASS problem
with the widget. Attached is a simple procedure (cursor_test.pro) to
illustrate the problem I'm having. If anyone can figure how to fix this
apparent bug, I'd really appreciate you sharing the solution. Thanks!
- Eric Frans
PRO cursor_test
widget_control, hourglass=1
for i = 0,1000 do begin
print,i
endfor
widget_control, hourglass=0
window,0
plot,[0,1],[0,1]
point = dialog_message('Pick a point on the plot?',/QUESTION)
if (point eq 'Yes') then begin
cursor,x,y,/up
oplot,[x],[y],psym=1
endif
wid_test
print,'Continue processing...'
END
;----
PRO wid_test_event,ev
WIDGET_CONTROL, ev.id, GET_UVALUE=uval
if (uval eq 'SUBMIT') then WIDGET_CONTROL, ev.top, /DESTROY
END
PRO wid_test
base = WIDGET_BASE(/COLUMN)
info = WIDGET_LABEL(base,VALUE='Imagine this is info. you must select to continue processing')
submit = WIDGET_BUTTON(base,VALUE='SUBMIT',UVALUE='SUBMIT')
WIDGET_CONTROL, base, /REALIZE
XMANAGER, 'wid_test', base
END
|
|
|
Re: WIDGET_CONTROL, /HOURGLASS ? [message #13241 is a reply to message #13229] |
Thu, 29 October 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Note: A copy of this article was e-mailed to the original poster.
Eric Frans (epfrans@west.raytheon.com) writes:
> I recently discovered the ability IDL 5.1 has to change the cursor to an
> hourglass, which is particularly helpful during time consuming processes
> like reading or writing large files. So I decided to use the line:
> WIDGET_CONTROL, /HOURGLASS
> in a procedure before reading in potentionally huge input files. The
> hourglass cursor appeared fine, but then when I launched a widget from
> the procedure after the input file had been read, the hourglass cursor
> didn't change back to normal, so I wasn't able to modify the widget
> entries at all. Is there some sort of clear command I need?
You could try this:
Widget_Control, Hourglass = 0
Sometimes we forget that /Keyword means Keyword = 1. :-)
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|