MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuel d'utilisateur Page 343

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 500
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 342
Add Components to a Programmatic UI
10-11
'String','Indent nested functions.',...
'Value',1,'Position',[30 20 150 20]);
The first uicontrol argument, f, specifies the parent container. In this case, the parent
is a figure, but you can also specify the parent to be any container, such as a panel or
button group. If you have multiple radio buttons, you can manage their selection by
specifying the parent to be a button group. See “Button Groups” on page 10-24 for
more information.
The name-value pair arguments, 'Style','radiobutton' specifies the uicontrol to a
radio button.
'String','Indent nested functions.' specifies a label for the radio button.
'Value',1 selects the radio button by default. Set the Value property to be the value
of the Max property to select the radio button. Set the value to be the value of the Min
property to deselect the radio button. The default values of Max and Min are 1 and 0,
respectively.
'Position',[30 20 150 20] specifies the location and size of the radio button. In
this example, the radio button is 150 pixels wide and 20 high. It is positioned 30 pixels
from the left of the figure and 20 pixels from the bottom.
Toggle Button
This code creates a toggle button:
f = figure;
tb = uicontrol(f,'Style','togglebutton',...
'String','Left/Right Tile',...
'Value',0,'Position',[30 20 100 30]);
Vue de la page 342
1 2 ... 338 339 340 341 342 343 344 345 346 347 348 ... 499 500

Commentaires sur ces manuels

Pas de commentaire