PlanetSquires Forums

Support Forums => General Board => Topic started by: Grant McIntosh on June 02, 2014, 09:05:37 AM

Title: Help with control to select a folder
Post by: Grant McIntosh on June 02, 2014, 09:05:37 AM
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.
Title: Re: Help with control to select a folder
Post by: Richard Kelly on June 02, 2014, 11:53:16 AM
Take a look at the built-in Firefly function FF_BrowseForFolder which sounds like what you are looking for.

Rick
Title: Re: Help with control to select a folder
Post by: David Kenny on June 02, 2014, 01:47:09 PM
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. 
Title: Re: Help with control to select a folder
Post by: Grant McIntosh on June 02, 2014, 02:06:30 PM
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?
Title: Re: Help with control to select a folder
Post by: David Kenny on June 02, 2014, 04:34:13 PM
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.
(http://browseforfolder.png)
Title: Re: Help with control to select a folder
Post by: Grant McIntosh on June 03, 2014, 03:46:58 AM
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.