How do I specify the location of a UIGETFILE box on a Windows machine?

To open the file-selection dialog box, I use the UIGETFILE function. The documentation states that the following line of code:
uigetfile('Location',[x y])
opens a dialog box at position [x,y], where x and y are the distances in pixel units from the left and top edges of the screen. The Location property-value pair is currently supported only on UNIX platforms.
The same holds true for the UIPUTFILE function. I am using MATLAB on Windows and I would like to position the dialog box somewhere other than the top-left corner of the screen.

 Accepted Answer

The ability to specify a Location property-value pair in a UIGETFILE or UIPUTFILE command is not available when running MATLAB in Windows.
To work around this issue, you will need to use a list-selection dialog box to select a file. The LISTDLG function opens a dialog in the center of the screen (rather than the top-left corner).
To see how to populate a list-selection dialog with the contents of a directory, refer to the example at the bottom of the LISTDLG documentation.

More Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Products

Release

R2006b

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!