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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 330
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 291
12 Examples of GUIs Created Programmatically
12-14
Note If you specify the Units property, then the Position property, and any
other properties that depend on the value of the
Units property, should follow
the Units property specification.
See the Axes Properties reference page for information about axes properties
and their default values.
The Pop-Up Menu
The following statement creates the pop-up menu.
hPlotsPopupmenu = uicontrol(... % List of available types of plot
'Parent', hMainFigure, ...
'Units','normalized',...
'Position',[0.11 0.85 0.45 0.1],...
'HandleVisibility','callback', ...
'String',mPlotTypes(:,1),...
'Style','popupmenu');
The uicontrol function creates various user interface controls based on the
value of the
Style property. Here the Style property is set to popupmenu.
For a pop-up menu, the
String property defines the list of items in the menu.
Here it is defined as a 5-by-1 cell array of strings derived from the cell array
mPlotTypes.
See the Uicontrol Properties reference page for information about properties of
uicontrol objects and their default values.
The Update Push Button
This statement creates the Update push button as a uicontrol object.
hUpdateButton = uicontrol(... % Button for updating selected plot
'Parent', hMainFigure, ...
'Units','normalized',...
'HandleVisibility','callback', ...
'Position',[0.6 0.85 0.3 0.1],...
'String','Update',...
'Callback', @hUpdateButtonCallback);
Vista de pagina 291
1 2 ... 287 288 289 290 291 292 293 294 295 296 297 ... 329 330

Comentarios a estos manuales

Sin comentarios