Re: Perl Tk::FBox and filter argument
- From: "Andy" <anedza@xxxxxxxxxxxxxxxxxxxxxx>
- Date: 30 Jan 2007 13:17:30 -0800
you are right! getOpenFile pops up the native windows file selector.
Don't know why I didn't use it before... I tried several different
Perl fileselectors and the fbox one looked closest to windows - I
never got the native windows selector in my experimentation before.
For those using fbox, the -filter function accepts a Perl glob()
function which holds a file mask:
$spreadsheetfilename = $mw->FBox(-type => "open",
-filter =>glob('*.xls'),
)->Show;
I found the missing documentation for fbox's -filter argument:
-filter => $val
A filter to restrict the directories and files in the icon
list. If
specified as a glob pattern, then only files will be
filtered by
the pattern. If specified as a subroutine, then this
subroutine
will be called for every file and directory and should
return a
true value, if the argument should be accepted for the icon
list.
The arguments of this subroutine are: FBox widget
reference, base-
name of file, and directory name.
The subroutine form of this option is experimental.
thanks for the help,
Andy
.
- References:
- Perl Tk::FBox and filter argument
- From: Andy
- Re: Perl Tk::FBox and filter argument
- From: Ch Lamprecht
- Perl Tk::FBox and filter argument
- Prev by Date: Re: ANNOUNCE: Xorg configuration model
- Next by Date: HTML:Parser how to remove "//<![CDATA[ ... //]]>" ?
- Previous by thread: Re: Perl Tk::FBox and filter argument
- Next by thread: Re: ANNOUNCE: Xorg configuration model
- Index(es):