MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Uživatelská příručka Strana 679

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 759
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 678
GUI with Axes, Menu, and Toolbar
Note MATLAB software automatically passes hUpdateButtonCallback
two arguments, hObjec t and ev entd ata,becausetheUpdate push button
component
Callback property, @hUpdate ButtonCallback,isdefinedasa
function handle.
hObject contains the handle of the component that triggered
execution of the callback.
eventdata is reserved for future use. The function
definition line for your callback must account for these two arguments.
Open Menu Item Callback
The hOpenMenuitemCallback function services the Open menu item and
the Open toolbar button
. Selecting the menu item or clicking the toolbar
button triggers the execution of this callback function.
function hOpenM enui temCallback(hObject, eventdata)
% Callback function run whe n the Open menu item is selected
file = uigetfile('*.m');
if ~isequal(fil e, 0)
open(file);
end
end
15-15
Zobrazit stránku 678
1 2 ... 674 675 676 677 678 679 680 681 682 683 684 ... 758 759

Komentáře k této Příručce

Žádné komentáře