browse files

For questions about using Classic.

Post » Thu Jun 03, 2010 9:12 pm

Hi,

Is there a way to have the user be able to browse the files on their computer?

I basically want the user to be able to choose a file from their drive to use in an app. It's easy enough to have them type a path in, but I'd much rather they could browse for the file.

Thanks for your help
B
9
S
4
G
5
Posts: 136
Reputation: 2,952

Post » Thu Jun 03, 2010 9:41 pm

Hi. The CommonDialog object can do that. It allows file open & save dialogs, as well as directory and color dialogs.

Here's a .cap (v0.99.84) with a simple demonstration of an open dialog:

[url:3opgw1vl]http://dl.dropbox.com/u/5868916/FileDialog.cap[/url:3opgw1vl]

Note that the filter does not need to be set, and if you want to start in a particular directory, you can set that in the 'Set initial file' action, and optionally include a default file name in that string as well.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Fri Jun 04, 2010 5:11 am

Awesome.

Thanks for that.

I'll have a play with that this evening.
B
9
S
4
G
5
Posts: 136
Reputation: 2,952


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest