MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guía de usuario Pagina 674

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 759
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 673
15 Examples of GUIs Created Programmatically
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', hMainFigu re, ...
'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', @hUpdateB uttonCallback);
The uicontrol function creates various user interface controls based on
the value of the
Style property. This statement does not set the Style
property because its default is pushbutton.
15-10
Vista de pagina 673
1 2 ... 669 670 671 672 673 674 675 676 677 678 679 ... 758 759

Comentarios a estos manuales

Sin comentarios