fileselector class : Select(string) method

Description

Opens a dialog in the specified directory.

Syntax

instance.Select(string path)

Arguments

ClassNameDescription
stringpathThe path to the directory.

Return value

ClassDescription
pairSelection result.

Sample code

1:

fileselector fsel = new fileselector();

2:

pair resuilt = fsel.Select("d:\");

3:

if(result.First)

4:

string filePath = result.Second;

5:

endif

Notes

If the specified directory does not exist, the dialog will be open in the directory where the last file was selected.


The selection result is returned as the pair class.

First: Whether a file is selected is stored as a bool class.

True if a file is selected. Otherwise it is false.

Second: It is stored the path of the selected file as the string. If no file is selected, it is an empty string.

Links for reference

None.

Copyright © Cooker All rights reserved.