Dialog for dir / file selection

View: New views
5 Messages — Rating Filter:   Alert me  

Dialog for dir / file selection

by matheus ribeiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello list,

is there a dialog which allows me to select either a file or directory
(java has one)?

For example: the cipher application im working on allows the user to
cipher either a directory or a single file. Currently, I have 2
separate menus for it, one using FXFileDialog other using FXDirDialog
according to the menu selected.

Thanks
Matheus

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: Dialog for dir / file selection

by Sander Jansen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think using SELECTFILE_MULTIPLE_ALL can do what you want...

Sander

On Thu, Aug 20, 2009 at 1:22 PM, Matheus Ribeiro<mfribeiro@...> wrote:

> Hello list,
>
> is there a dialog which allows me to select either a file or directory
> (java has one)?
>
> For example: the cipher application im working on allows the user to
> cipher either a directory or a single file. Currently, I have 2
> separate menus for it, one using FXFileDialog other using FXDirDialog
> according to the menu selected.
>
> Thanks
> Matheus
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Foxgui-users mailing list
> Foxgui-users@...
> https://lists.sourceforge.net/lists/listinfo/foxgui-users
>



--
"And any fool knows a dog needs a home
A shelter from pigs on the wing"

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: Dialog for dir / file selection

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 20 August 2009, Matheus Ribeiro wrote:
> Hello list,
>
> is there a dialog which allows me to select either a file or directory
> (java has one)?
>
> For example: the cipher application im working on allows the user to
> cipher either a directory or a single file. Currently, I have 2
> separate menus for it, one using FXFileDialog other using FXDirDialog
> according to the menu selected.

As Sander already mentioned, SELECTFILE_MULTIPLE_ALL selects multiple
files and/or directories.

But there isn't any option that selects just a single file OR directory;
SELECTFILE_ANY doesn't do what you need since while it can return any
file, it doesn't actually populate the text box with the name of the
directory you click on.

So perhaps a new option might be needed for this particular scenario,
unless SELECTFILE_MULTIPLE_ALL fits the bill for you...


        - Jeroen



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: Dialog for dir / file selection

by matheus ribeiro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> As Sander already mentioned, SELECTFILE_MULTIPLE_ALL selects multiple
> files and/or directories.

This flag didnt work for me at all. I tried it on the opt parameter of
FXFileDialog constructor, is it correct?

> But there isn't any option that selects just a single file OR directory;
> SELECTFILE_ANY doesn't do what you need since while it can return any
> file, it doesn't actually populate the text box with the name of the
> directory you click on.
>
> So perhaps a new option might be needed for this particular scenario,
> unless SELECTFILE_MULTIPLE_ALL fits the bill for you...

Yes, I want to single click a file or directory and fill the text box
of the dialog.

Thanks for you time
Matheus

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: Dialog for dir / file selection

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 20 August 2009, you wrote:
> > As Sander already mentioned, SELECTFILE_MULTIPLE_ALL selects multiple
> > files and/or directories.
>
> This flag didnt work for me at all. I tried it on the opt parameter of
> FXFileDialog constructor, is it correct?

No, you should call filedlg->setSelectMode(SELECTFILE_MULTIPLE_ALL) instead.
The options are mostly for layout and core widget features.

> > But there isn't any option that selects just a single file OR directory;
> > SELECTFILE_ANY doesn't do what you need since while it can return any
> > file, it doesn't actually populate the text box with the name of the
> > directory you click on.
> >
> > So perhaps a new option might be needed for this particular scenario,
> > unless SELECTFILE_MULTIPLE_ALL fits the bill for you...
>
> Yes, I want to single click a file or directory and fill the text box
> of the dialog.

SELECTFILE_MULTIPLE_ALL puts (multiple) things in the text box. You
can use it to select only one thing, but the GUI doesn't limit the
number of items selected like SELECTFILE_EXISTING would do.


        - Jeroen



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users