MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guida Utente Pagina 516

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 759
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 515
11 Lay Out a Programmatic GUI
The Value property specifies w hether the radio button is selected when the
component is created. Set
Value to the value of the Max property (default is
1) to create the component with the radio button selected. Set Value to Min
(default is 0) to leave the radio button unselected.
The
Position property specifies the location and size of the radio button. In
this example, the radio button is 150 pixels wide and 2 0 high. It is positioned
30 pixels from the left of the figure and 20 pixels from the bottom. The
statementassumesthedefaultvalueofthe
Units property, which is pixels.
Note You can also use an image as a label. See “Add an Image to a Push
Button” on page 11-26 for more information.
Slider
The following statement creates a slider with handle sh:
sh = uicontrol(fh,'Style','slider' ,...
'Max',100,'Min',0,'Value',25,...
'SliderStep',[0.05 0.2],...
'Position',[30 20 150 30]);
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” on page
11-35 and “Button Group” on page 11-36 for more information.
The
Style property, slider, specifies the u ser interface control as a slider.
Specify the range of the slider by setting its
Min property to the minim um
value o f the slider and its
Max property to the maximum value. The Min
property must be less than Max.
11-28
Vedere la pagina 515
1 2 ... 511 512 513 514 515 516 517 518 519 520 521 ... 758 759

Commenti su questo manuale

Nessun commento