Re: widget_list() question [message #72459 is a reply to message #72458] |
Thu, 09 September 2010 12:32  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
I just read "Returning LIST widget values" on the Coyote website. That answers part of my question regarding retrieving
the values.
And the "dynamic_menus.pro" example of the same pretty much answers the rest.
Apologies for the noise....
cheers,
paulv
Paul van Delst wrote:
> Hello,
>
> I am putting together a little display tool where I would like to keep track of datafiles I have been using/displaying.
> I want all the filenames for the session to be visible, as well as selectable so I can "flip" between files (all of the
> data from the files are kept in an IDL_Container object.)
>
> So what I want to be able to do is:
> 1) create an empty list widget.
> 2) append new filenames to the list as they are read in. (e.g. "widget_control, id, append_value = filename" type of thing)
> 3) retrieve the list of all the filenames, or just the currently selected one.
> 4) retrieve the position in the list of the currently selected entry (I think I know how to do that already).
>
> I thought I could use a regular old WIDGET_LIST() to do this but it appears to be quite difficult to concatenate values
> in an already existing list, to say nothing of retrieving the list of string values in the list. I gather I'll need to
> use the FUNC_GET_VALUE keyword, but how does one construct a function to retrieve the list contents? (The documentation
> didn't point to any examples that I could find)
>
> I guess the question I'm asking is if widget_list() can handle this sort of functionality, or do I need to construct my
> own compound widget to do the job?
>
> Alternatively, should I just keep track of stuff in my own (already existing) file_list container and simple recreate
> the list from scratch everytime something changes? (Seems a bit bull-in-a-china-shop'ish)
>
> Any info/hints appreciated.
>
> cheers,
>
> paulv
|
|
|