comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » list widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
list widgets [message #10807] Fri, 23 January 1998 00:00 Go to next message
deb is currently offline  deb
Messages: 12
Registered: April 1996
Junior Member
Is there a way to enable selection of multiple items from a list widget?
Re: list widget [message #21476 is a reply to message #10807] Tue, 29 August 2000 00:00 Go to previous message
zeraph is currently offline  zeraph
Messages: 6
Registered: May 2000
Junior Member
>>>> Try Selected = Widget_Info(MyWidgetList, /list_Select).
>>
>> Cheers ben - Why does he think this to be bad? I
>
> get used to taking everything he says with a grain
> of salt. :-)

It was Pavel who dissed your work and I can't take DF's words with a
pinch of salt - I'm indoctrinated - I even have DF's signature on his
book.... ha ha ha *sigh*


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: list widget [message #21479 is a reply to message #10807] Tue, 29 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Stuart Robertson (zeraph@my-deja.com) writes:
>
>>> Try Selected = Widget_Info(MyWidgetList, /list_Select).
>
> Cheers ben - Why does he think this to be bad? I

Fanning is a bit of a pedantic at times. You just
get used to taking everything he says with a grain
of salt. :-)

Cheers,

Ben
Re: list widget [message #21480 is a reply to message #10807] Tue, 29 August 2000 00:00 Go to previous message
zeraph is currently offline  zeraph
Messages: 6
Registered: May 2000
Junior Member
Cheers DF and Ben for your thoughtful replies.

> ...This makes these list widgets harder to work with than
> you ever thought possible.

I Dunno - I think they are pretty hard...

> In practice, you almost always have to incorporate them
> into some kind of compound widget, with more buttons so
> you can figure out what you are suppose to *do* with the
> list items. :-(

Really don't want buttons - it is a filename(of images) 'scanner',
designed to just scan through a list of a zillion filenames with the
arrow keys displaying/searching(visually) for a particular feature.
I would like to use multiple select for better signal to noise in some
data sets(I guess I could use a button for multiple selects - yeah that
could work).

> In fact, this may be just the example I was kicking
> around for this morning to show off what a wonder
> compound widgets written as objects are.

I was the beginner guy in your UK class this march who didn't get OOP
very well. Just thought I'd mention that...

> I'm in the middle of something else at the moment, but check
> back later this week. I might have something for you. :-)

Thank you.

>> Try Selected = Widget_Info(MyWidgetList, /list_Select).

Cheers ben - Why does he think this to be bad? I think its dead good
and exactly the solution I was looking for (though I'll be checking
DF's example with intrest [and probably intricate incomprehension]).

> I am afraid you are in trouble :-(
> I would not post this if I were you, no matter how true it is, in the
> light of the upcoming EPA exam ...

Wow you have an exams and political Manoeuvring- do you have a badge
in your wallet too? Licence to solve dead hard IDL problems or
something... "Stand Back Sir, this is a job for the EPA"
Anyway, thanks for reading and helping,
Stu.
:-)


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: list widget [message #21481 is a reply to message #10807] Tue, 29 August 2000 00:00 Go to previous message
zeraph is currently offline  zeraph
Messages: 6
Registered: May 2000
Junior Member
Cheers DF and Ben for your thoughtful replies.

> ...This makes these list widgets harder to work with than
> you ever thought possible.

I Dunno - I think they are pretty hard...

> In practice, you almost always have to incorporate them
> into some kind of compound widget, with more buttons so
> you can figure out what you are suppose to *do* with the
> list items. :-(

Really don't want buttons - it is a filename(of images) 'scanner',
designed to just scan through a list of a zillion filenames with the
arrow keys displaying/searching(visually) for a particular feature.
I would like to use multiple select for better signal to noise in some
data sets(I guess I could use a button for multiple selects - yeah that
could work).

> In fact, this may be just the example I was kicking
> around for this morning to show off what a wonder
> compound widgets written as objects are.

I was the beginner guy in your UK class this march who didn't get OOP
very well. Just thought I'd mention that...

> I'm in the middle of something else at the moment, but check
> back later this week. I might have something for you. :-)

Thank you.

>> Try Selected = Widget_Info(MyWidgetList, /list_Select).

Cheers ben - Why does he think this to be bad? I think its dead good
and exactly the solution I was looking for (though I'll be checking
DF's example with intrest [and probably intricate incomprehension]).

> I am afraid you are in trouble :-(
> I would not post this if I were you, no matter how true it is, in the
> light of the upcoming EPA exam ...

Wow you have an exams and political Manoeuvring- do you have a badge
in your wallet too? Licence to solve dead hard IDL problems or
something... "Stand Back Sir, this is a job for the EPA"
Anyway, thanks for reading and helping,
Stu.
:-)


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: list widget [message #21492 is a reply to message #10807] Tue, 29 August 2000 00:00 Go to previous message
promashkin is currently offline  promashkin
Messages: 169
Registered: December 1999
Senior Member
Ben Tupper wrote:

> Try Selected = Widget_Info(MyWidgetList, /list_Select).

Ben,
I am afraid you are in trouble :-(
I would not post this if I were you, no matter how true it is, in the
light of the upcoming EPA exam ...
Cheers,
Pavel
Re: list widget [message #21494 is a reply to message #10807] Tue, 29 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Stuart Robertson (zeraph@my-deja.com) writes:

> Wow, you guys are getting a bit philosophical here.

They are showing off. It is the kind of posturing and
thumping the chest that always goes on in the lead-up
to elections in the IDL Expert Programmers Association
meeting in October. Don't pay any attention to it.
It (and the national elections, which have been going
on now for, what, 10 years?) will be over soon.

> Here is my widget_definition:
> Widget_list(tlb,sensitive=1,/multiple,ysize=26,event_pro='an ypro')
>
> So I get my array of filenames into my list widget and then try to
> select four files by left click + shift left click below (or just
> dragging the cursor) so it highlights the desired four file names and
> the event.index only gives the index of the last filename.
>
> Is there something obvious I'm doing/not doing or some secret IDL kung
> fu I could perform to get it to work?

Oh, you thought "multiple" meant you might get...
No, that would be *way* too easy. No programming
involved there. Not a programmer's solution at all. :-)

In fact, "multiple" only changes what the list widget will
*look* like, it doesn't change the way it works one iota.
Every time you make a selection you get an event in your
event handler. If you want to keep track of them all,
you will have to figure out a way to do that. This makes
these list widgets harder to work with than you ever
thought possible.

In practice, you almost always have to incorporate them
into some kind of compound widget, with more buttons so
you can figure out what you are suppose to *do* with the
list items. :-(

In fact, this may be just the example I was kicking
around for this morning to show off what a wonder
compound widgets written as objects are. I'm in the
middle of something else at the moment, but check
back later this week. I might have something for you. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: list widget [message #21495 is a reply to message #10807] Tue, 29 August 2000 00:00 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
Hello,

Try Selected = Widget_Info(MyWidgetList, /list_Select). Selected should
contain the indices in the selection sorted in ascending order (even if
selected from the bottom up.)

It is appealing to make the INDEX value the list selection, but then it
would have to be variable in size. Since the returned event is a named
structure, then the index field would have to be a pointer (so it could be
pointing to a scalar, an array, etc.) If it was a pointer, then who is
responsible for cleaning it up and when? You don't want to walk into
that pasture without stepping with great care.

I bumped into this just recently when writing a wrapper around the list
widget; I made the event structure with two special fields, Index0 (the
first index) and SelectN (the number of selections).

Its good to wax pragmatic.

Ben

Stuart Robertson wrote:

> Wow, you guys are getting a bit philosophical here. This is my first
> posting and OK you definitely have my respect, but could you possibly
> lower yourself to helping with questions like 'Why I don't get multiple
> element output from my list widget?' please?
>
> Here is my widget_definition:
> Widget_list(tlb,sensitive=1,/multiple,ysize=26,event_pro='an ypro')
>
> So I get my array of filenames into my list widget and then try to
> select four files by left click + shift left click below (or just
> dragging the cursor) so it highlights the desired four file names and
> the event.index only gives the index of the last filename.
>
> Is there something obvious I'm doing/not doing or some secret IDL kung
> fu I could perform to get it to work?
>
> Thanks very much,
> Stu.
> (Of the DF academy of IDL programmers)
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
Ben Tupper
Bigelow Laboratory for Ocean Science
West Boothbay Harbor, Maine
btupper@bigelow.org
note: email address new as of 25JULY2000
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: set_character_size and XYOUTS
Next Topic: Origin of IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:10:51 PDT 2025

Total time taken to generate the page: 0.00688 seconds