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

Home » Public Forums » archive » Re: Displaying a list of filenames
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: Displaying a list of filenames [message #78895 is a reply to message #78894] Tue, 03 January 2012 07:45 Go to previous messageGo to previous message
Percy Pugwash is currently offline  Percy Pugwash
Messages: 12
Registered: January 2012
Junior Member
On Jan 3, 3:11 pm, David Fanning <n...@dfanning.com> wrote:
> Percy Pugwash writes:
>> I would like to display a list of filenames in an widget application.
>> I have so far been unable to find a satisfactory way of doing this,
>> since I would like the user to be able to:
>
>> 1) Select one or several of the filenames in the list
>> 2) View the whole filepath, right-aligned so that the name at the end
>> is clear
>
>> I can't seem to right-align a list widget, and a text widget won't let
>> me select an item in the list in a straightforward way. I think I can
>> make it work with a table widget, but that seems to have irritating
>> and unnecessary scroll bars.
>
>> Does anyone have a solution?
>
> My solution, after years of frustration trying to do just
> this, was to retreat to a smarter version of Dialog_Pickfile,
> which can remember the directory (and file, if I want) that
> I previously selected. It's made my life easier and I no
> longer wake up in terror at night thinking about table widgets. :-)
>
>   http://www.idlcoyote.com/idldoc/cg/cgpickfile.html
>
> Cheers,
>
> David
>
> P.S. Set the MULTIPLE keyword if you want to select
> multiple files.
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

David,

Thanks very much. While I can see that cgPickfile offers some useful
options not present in dialog_pickfile, I'm not sure if it's quite
suitable for my purpose. The idea here is the the files have already
been selected, and the selected files are displayed in a list of some
kind, such that the user can highlight any given one of those files in
order to tweak the processing steps for that file (with options given
in the widget application). As such, I think it's quite important that
the list would be embedded directly into the top-level base of the
application. The files themselves might not all be in the same
directory.

Another slightly less satisfactory route I was considering exploring
would be to use widget_list, but truncate the displayed paths so that
the rightmost portion of the path is visible. However, this requires a
way to calculate how much of the string will exactly fit in the
available space. I suppose I could set the list to be a set width in
characters, and then at least be sure that if I truncate each string
to be equal to that width, they would fit in the box. I think it'd be
quite unattractive though.

P
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Displaying a list of filenames
Next Topic: running IDL as a 'sleeping' process

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

Current Time: Fri Oct 10 14:13:26 PDT 2025

Total time taken to generate the page: 0.39675 seconds