[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: widget_list in IDL 5.1
- To: David Fanning <davidf(at)dfanning.com>
- Subject: Re: widget_list in IDL 5.1
- From: David Foster <foster(at)bial1.ucsd.edu>
- Date: Wed, 10 Jun 1998 13:59:47 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Univ. of Calif San Diego
- References: <357D5A0B.2E73@edcmail.cr.usgs.gov> <357DA908.E4005364@astrosun.tn.cornell.edu> <MPG.email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:11232
David Fanning wrote:
> It seems I have several choices:
> (1) Act on every event, which I normally don't like to do
> at all.
> (2) Guess when the user is finished, which results (believe me!)
> in a lousy user interface.
> (3) Write a compound widget with the list widget and an OK
> button to let me know when the user *really* wants me to
> respond to the selection event. But this is just like the
> multiple selection widget I hacked up before the MULTIPLE
> keyword was available.
> What do some of the rest of you do? If we can get some
> kind of consensus, I'll write an article about it for my
> web page.
What I do is probably a similar hack to what everyone else has to
do to get this to work. I just have an array of flags that tell me
which items are currently selected, and each time I process a
WIDGET_LIST event I update the flags (to either select or unselect
items). In the list itself, selected items are marked with '*'.
In our applications it's always the case that the user has to
press some "Start" button or the like to act on the selected items,
so knowing when the user is finished selecting items isn't really
an issue (yet!).
I was very disappointed after I learned that the event from a
list widget only returns one item when multiple items are selected.
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
firstname.lastname@example.org Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037