MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guida Utente Pagina 571

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 759
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 570
Create Menus for a Programmatic GUI
fh = figure('Position',[300 300 400 225]);
cmenu = uicontextmenu('Parent', fh,'Position',[10 215]);
At this point, the figure is visible, but not the menu.
Note “Force Display of the Context Menu” on page 11-86 explains the use of
the
Position property.
Add Menu Items to the Context Menu
Use the uimenu function to add items to the context menu. The items appear
onthemenuintheorderinwhichyouaddthem. Thefollowingcodeadds
three items to the context menu created above.
mh1 = uimenu(cmenu,'Label','Item 1');
mh2 = uimenu(cmenu,'Label','Ite m 2');
mh3 = uimenu(cmenu,'Label','Ite m 3');
If you could see the context menu, it would look like this:
11-83
Vedere la pagina 570
1 2 ... 566 567 568 569 570 571 572 573 574 575 576 ... 758 759

Commenti su questo manuale

Nessun commento