You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-1Lines changed: 72 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,84 @@ This utility was inspired by: [Making a dialog where the user can choose either
16
16
17
17
`___ = uiget(basepath)`
18
18
19
-
`___ = uiget(___, Name, Value)`
19
+
`___ = uiget(basepath, Name, Value)`
20
20
21
21
22
+
## Description
23
+
24
+
`file = uiget()` opens a modal dialog box that lists files and folders in the current folder. It enables a user to select or enter the name of a file. `uiget` returns the file name when the user clicks **Open**. If the user clicks **Cancel** or the window close button (X), uigetfile returns `""`.
25
+
26
+
**NOTE:** If the user intends to choose a directory, they must specify a second output argument to `uiget`. If a directory is chosen in the single-output case, an empty string is returned and the user is presented with a warning. This is true for both a single selection and when using `'MultiSelect'`.
27
+
28
+
`[file, path] = uiget()` returns the file name and path to a file or folder when the user clicks **Open**. If the user clicks **Cancel** or the window close button (X), then `uiget` returns `""` for both output arguments.
29
+
30
+
`___ = uiget(basepath)` specifies the start path in which the dialog box opens. If path is empty or is not a valid path, then the dialog box opens in the current working directory.
31
+
32
+
`___ = uiget(basepath, Name, Value)` specifies dialog box parameters using one or more `Name, Value` pair arguments. See below for a list of valid `Name, Value` pairs.
33
+
22
34
## Examples
23
35
36
+
### Select a single file
37
+
38
+
```
39
+
>> file = uiget()
40
+
41
+
file =
42
+
43
+
"uiget.m"
44
+
```
45
+
46
+
Selecting a directory provides the behavior described above:
47
+
```
48
+
>> file = uiget()
49
+
Warning: One or more paths have been selected without requesting the path output.
50
+
Please specify a second output to uiget to receive these paths.
51
+
> In uiget (line 96)
52
+
53
+
file =
54
+
55
+
""
56
+
```
57
+
58
+
### Select a File and Display Full File Specification
0 commit comments