Help with control to select a folder

Started by Grant McIntosh, June 02, 2014, 09:05:37 AM

Previous topic - Next topic

Grant McIntosh

Hi again,  I'm looking to have a control that will allow the user to set a directory (folder).  I looked at the FolderTree control, but that looks a bit 'old fashioned' and hunting around the forum it seems it's not a control that has much (if any) support. Looking at other programs, it seems more common these days to have something more like FF uses, say in the Tools | Environment Options | General | Default Project Folder
I'm not sure if this is a special control or if it's something like a text box with a separate button and additional code behind it. Could somebody please offer some advice (and / or examples) as to how to implement something like the way FF does it?
Thanks in advance for the great help I've been getting here.
PBCC6.04
PBWin10.04
FF3.70
Vista

Richard Kelly

Take a look at the built-in Firefly function FF_BrowseForFolder which sounds like what you are looking for.

Rick

David Kenny

Grant,

No control for that.  The example you gave is a button control with the caption set to "...".  When the user clicks on it, it simply calls the function that Rick mentioned. 

Grant McIntosh

Thanks guys, a great response. OK, So the part that shows the folder (that is eventually selected by the user), would simply be a text box to display whatever result from the function, is that about right?
PBCC6.04
PBWin10.04
FF3.70
Vista

David Kenny

QuoteSo the part that shows the folder (that is eventually selected by the user), would simply be a text box to display whatever result from the function, is that about right?
Yes.

You can find more info about the inputs and outputs of that function on the "Description" tab for FF_BrowseForFolder in the Functions Library.

Grant McIntosh

Great! Thanks for that guys, very helpful and looks like there's lot more useful functions there. Now I'll just have to try to get more familiar with what's there.
PBCC6.04
PBWin10.04
FF3.70
Vista