MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 508

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 507
11 Lay Out a Programmatic GUI
Instead of d esignating a font yourself, you could provide a push button or
context menu in your GUI that allows users to select fonts themselves via the
uisetfont GUI. The callback for the feature could be
font = uisetfont;
set(eth,'font')
where eth is the handle for the edit b ox whose font the user is setting. You
can store the handle in the figure’s
AppData and retrieve it with getappdata.
List Box
The following statement creates a list box with handle lbh:
lbh = uicontrol(fh,'Style','listbo x',...
'String',{'one','two','three','four' },...
'Value',1,'Position',[30 80 130 20]);
The first argument, fh, specifies the handle of the parent figure. You can also
specify the parent as a panel or button group. See “Panel” o n page 11-35 and
“Button Group” on page 11-36 for more information.
The
Style property, lis tbox , specifies the user interface control a s a list box.
The
String property defines the list items. You can specify the items in a ny
of the formats shown in the following table.
11-20
Vue de la page 507
1 2 ... 503 504 505 506 507 508 509 510 511 512 513 ... 758 759

Commentaires sur ces manuels

Pas de commentaire