MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual de usuario Pagina 193

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 330
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 192
Examples: Programming GUI Components
8-21
elseif button_state == get(hObject,'Min')
% Toggle button is not pressed-take appropriate action
...
end
Note Use a button group to manage exclusive selection behavior for toggle
buttons. You must include the code to control these toggle buttons in the
button group’s
SelectionChangeFcn callback function, not in the individual
toggle button
Callback functions. A button group overwrites the Callback
properties of radio buttons and toggle buttons that it manages. See “Button
Group” on page 8-26 for more information.
Radio Button
You can determine the current state of a radio button from within its callback
by querying the state of its
Value property, as illustrated in the following
example:
if (get(hObject,'Value') == get(hObject,'Max'))
% Radio button is selected-take approriate action
else
% Radio button is not selected-take approriate action
end
Note Use a button group to manage exclusive selection behavior for radio
buttons. You must include the code to control these radio buttons in the
button group’s
SelectionChangeFcn callback function, not in the individual
radio button
Callback functions. A button group overwrites the Callback
properties of radio buttons and toggle buttons that it manages. See “Button
Group” on page 8-26 for more information.
Check Box
You can determine the current state of a check box from within its callback by
querying the state of its
Value property, as illustrated in the following
example:
Vista de pagina 192
1 2 ... 188 189 190 191 192 193 194 195 196 197 198 ... 329 330

Comentarios a estos manuales

Sin comentarios