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

Home » Public Forums » archive » Re: How to select best from a long list?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to select best from a long list? [message #18207 is a reply to message #18204] Fri, 10 December 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Michael Spranger (q4668057@bonsai.fernuni-hagen.de) writes:

> Another newbie question:

Well, unlike most newbie questions, this one appears
to have a possible solution. :-)

> I have a long list (about 16,000 entries) of cities names (downloaded
> from NIMA), plus according Longs and Lats.
> I'd like to realize a functionality similar to the "index help".
> Explicitly: while entering the first letters of the name, I'd like to
> see a scrolling list showing the entries of my list with the same
> beginning as typed in.
> In the end I'd like to select one entry and give back name, long, lat
> to the main program.
> Anybody who realizes a similar functionality? Could that be realized
> with widget_list? Or is there a better way?

This is the *perfect* time to learn how to build
a compound widget, because that is exactly what
you want here. You want a text widget for typing,
a list widget for presenting the user with choices,
a "Done" button, and some way to get the choices
back to the main routine (probably as the event
coming from your compound widget).

And if you *really* want to learn something about
IDL, you might even want to write this this
example as an object widget. Now *that* would
impress the jaded experts around here! :-)

I put a couple of examples up on my web page recently,
although I still haven't gotten around to writing the
articles that explain them in detail. But you can find
a compound widget consisting of a label widget next
to a text widget here:

http://www.dfanning.com/programs/coyote_field.pro

And the same program functionality, written this time as an object
widget here:

http://www.dfanning.com/programs/fsc_inputfield__define.pro

It strikes me that this might be an even better example
for the web page, however. I'm teaching an advanced IDL
programming class next week. Perhaps we will see what
people can come up with in a programming exercise. :-)

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
[Message index]
 
Read Message
Read Message
Previous Topic: Segmentation Fault
Next Topic: LMFIT -- stay away from it!

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

Current Time: Sun Nov 30 14:58:45 PST 2025

Total time taken to generate the page: 0.80577 seconds