MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Especificações Página 180

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 216
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 179
5 GUI Applications
5-14
index_selected = get(handles.listbox1,'Value');
file_list = get(handles.listbox1,'String');
filename = file_list{index_selected}; % Item selected in list box
if handles.is_dir(handles.sorted_index(index_selected)) % If directory
cd (filename)
load_listbox(pwd,handles) % Load list box with new directory
else
[path,name,ext,ver] = fileparts(filename);
switch ext
case '.fig'
guide (filename) % Open FIG-file with guide command
otherwise
try
open(filename) % Use open for other file types
catch
errordlg(lasterr,'File Type Error','modal')
end
end
end
end
Opening Unknown File Types
You can extend the file types that the open command recognizes to include any
file having a three-character extension. You do this by creating an M-file with
the name
openxyz, where xyz is the extension. Note that the list box callback
does not take this approach for FIG-files since
openfig.m is required by the
GUI M-file. See
open for more information.
Vista de página 179
1 2 ... 175 176 177 178 179 180 181 182 183 184 185 ... 215 216

Comentários a estes Manuais

Sem comentários