MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Podręcznik Użytkownika Strona 707

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 706
A GUI That Manages List Data
Menu
Item
How Used Callback
Save
as...
Saves current List Master to a
different F IG-file
lmsaveas
Quit
Exits List Master, with option to save
first
lmquit
After y ou create a blank GUI with its File menu, the listmaster function
exits.
The main function sets up the figure as follows:
fh = figure('MenuBar','none', ...
'NumberTitle','off', ...
'Name','ListMaster', ...
'Tag','lmfigtag', ...
'CloseRequestFcn', @lmquit, ...
'Units','pixels', ...
'Position', po s);
Turning off the MenuBa r eliminates the default figure window menus, which
the program later replaces with its own File menu.
NumberTitle is turned
off to eliminate a figure serial number in its title bar, which is given the title
ListMaster via the Name property.
The initial
Position of the GUI on the monitor is computed as follows:
su = get(0,'Units');
set(0,'Units','pixels')
scnsize = get(0,'ScreenSize');
scnsize(3) = min(scnsize(3),1280); % Limit superwide screens
figx = 264; figy = 356; % Default (resizable) GUI size
pos = [scnsize(3)/2-figx/2 scnsize(4)/2-figy/2 figx figy];
...
set(0,'Units',su) % Restore default root screen units
The Open menu option only opens figures created by listmaster.m.Every
List Master figure has its
Tag set to lmfigtag. When the program opens a
FIG-file, it uses this property value to determine that figure is a List Master
15-43
Przeglądanie stron 706
1 2 ... 702 703 704 705 706 707 708 709 710 711 712 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag