XADwindowaddmenu


Purpose
Add a dropdown menu to the window.
Synopsis
procedure XADwindowaddmenu(id:integer, title:string, items:string)
procedure XADwindowaddmenu(id:integer, title:string, itemset: set of string)
Arguments
id 
Window identifier
title 
Menu title (e.g. File, Edit)
items 
Comma-separated list of strings representing the menu items
itemset 
Set of strings representing the menu items
Example

XADwindowaddmenu(id_win,"","")  !pass empty string to clear existing menu, if any
XADwindowaddmenu(id_win,"&File","&New,&Open,&Save,XADseparator,E&xit")
XADwindowaddmenu(id_win,"&Help","&Help on MyApp,&About...")
   
Further information
  • Respond to menu selections by checking the XAD_EVENT_MENU event.
  • Use the ampersand character & to create a Alt+letter hotkey for each menu item.
  • Use the string "XADseparator" to insert a line separator in the menu.
  • Pass an empty title to reset and destroy the menu. Then rebuild the entire menu.



  • If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.