Creating Graphical User Interfaces    

Specifying the Directory to List

You can specify the directory to list when the GUI is first opened by passing the full pathname as a string input argument. If you do not specify a directory (i.e., if you call the application M-file with no input arguments), the GUI then uses MATLAB's current directory.

As generated, the application M-file launches the GUI when there are no input arguments and calls a subfunction when the first input argument is a character string. This example changes this behavior so that you can call the M-file with:

The following code listing show the entire initialization section of the application M-file. The statements in bold are the additions made to the generated code:


 List Box Directory Reader Loading the List Box