pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Charles <chrcharle...@gmail.com>
Subject Re: FileBrowserSheet with filter
Date Mon, 19 Apr 2010 06:54:37 GMT
Great !
Big thanks Greg !


2010/4/18 Greg Brown <gkbrown@mac.com>

> > Actualy, With FileBrowserSheet can i use a filter to select only *.xls
> files ?
>
> You can do this by setting a disabled file filter on your file browser
> sheet:
>
>    fileBrowserSheet.setDisabledFileFilter(new Filter<File>() {
>        @Override
>        public boolean include(File file) {
>            return (file.isFile()
>                && !file.getName().endsWith(".xls"));
>        }
>    });
>
> By default, disabled files will still appear but will not be selectable. To
> hide them, you can set the "hideDisabledFiles" style:
>
>    fileBrowserSheet.getStyles().put("hideDisabledFiles", true);
>
> Note that, while these examples are written in Java, you can also do this
> in WTKX.
>
> Hope this helps.
>
> Greg
>
>

Mime
View raw message