Re: modal widgets problem [message #39142] |
Tue, 20 April 2004 12:57 |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
David Fanning <david@dfanning.com> writes:
>
> Cheers,
Hey David, didn't you just go swimming with the penguins in Outer
Waistlands, Alaska, or something? Your posts have been pretty
subdued, almost like you endured a contest of man and nature, and
nature won. No good stories about tongues and flagpoles?
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: modal widgets problem [message #39143 is a reply to message #39142] |
Tue, 20 April 2004 12:24  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Benjamin Hornberger writes:
> I have a GUI called 'display_array_gui' which can display an array,
> change min and max values, colortables etc. From display_array_gui, I
> want to call a 'histogram_gui', which displays a histogram of the array,
> and I want to click into the histogram to adjust the min and max in
> display_array_gui.
>
> While histogram_gui is open, I want display_array_gui to be blocked from
> receiving input (e.g., its min and max fields, because they would
> interfere with the histogram). But when I click into the histogram, I
> want to have display_array_gui update its min and max for the display.
> The new min or max will be sent to display_array_gui through an event
> structure and widget_control, .., send_event = ...
>
> If I use the modal and group_leader keywords in histogram_gui's tlb, it
> will block display_array_gui, but the display update will be delayed
> until histogram_gui is closed. If I don't, then display_array_gui is not
> blocked and could in principle have parameters changed which would
> interfere with the histogram display.
>
> I tried to set display_array_gui's tlb to insensitive when histogram_gui
> is opened. That works in the first place, but seems quite unprofessional
> to me, and I haven't figured out yet how to make it sensitive again when
> histogram_gui is closed (I might find that out with some more trying).
Making the second widget program non-modal, and the first insensitive
doesn't sound a bit unprofessional to me. It certainly gives a visual
clue to the user about what is going on. An alternative would be to
change the event handler (or handlers, if you have several) to a
null event handler (accepts events, but does nothing with them) while
the second program is on the display. But I think this is likely to
confuse users. (Why does this button not work now, when it worked
just a second a go!?). To make your program sensitive again, just
set the SENSITIVE keyword to 1 with the WIDGET_CONTROL command.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|