Re: widget with check table ?? [message #12592 is a reply to message #12590] |
Tue, 25 August 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Martin Vissers (martin.vissers@users.whh.wau.nl) writes:
> I'm trying to create a dialog in which you can select
> several options within a table.
>
> Can this be done with widget programming ???
> an example:
>
> | AA | BB | CC |
> --------------------------|
> 1 | x | | |
> --------------------------|
> 2 | | | x |
> --------------------------|
> 3 | x | x | x |
> --------------------------|
> 4 | | | |
> --------------------------|
> 5 | | | x |
> --------------------------|
>
> so the user can select (with an x or a radio button) which
> options will be processed.
Oh, of course this can be done with widget programming. What can't? :-)
I would set the ALL_EVENTS keyword to 1 and turn off the
EDITABLE keyword. Then, when the user tries to type something
in the field I would know about it and write an X into the
field (no matter what they are trying to actually type).
The documentation says that the EDITABLE keyword suppresses
all events, but I am certain this is not true, and in any
case is belied by the little chart further in the documentation
that shows you how the two keywords interact.
If you would like to see an example of how to write an event
handler that works with ALL_EVENTS on and EDITABLE off, download
the program GETIMAGE from my web page and look at the module
GETIMAGE_INTEGER_ONLY. This event handler only allows the
user to type integer values into a text widget. The principle
here is exactly the same.
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/
|
|
|