Inheritance diagram for MenuBar:
Properties | |
IDispatch *RW | Menu [] |
The Action object that represents the menu. |
Examples:
o = new ActiveXObject("Scripting.WindowSystemObject") o.EnableVisualStyles = true f = o.CreateForm(0,0,0,0) f.Text = "WSO" f.ClientWidth = 300 f.ClientHeight = 100 f.CenterControl() ReBar = f.CreateReBar(0,0,0,0) ReBar.Align = o.Translate("AL_TOP") ReBar.BandBorders = true MenuBar = ReBar.CreateMenuBar(0,0,0,0) FileMenu = MenuBar.Menu.Add("File") ToolBar = ReBar.CreateToolBar(0,0,0,0) ToolBar.Buttons.Add("Button1") ToolBar.Buttons.Add("Button2") ToolBar.Buttons.Add("Button3") ToolBar.Buttons.Add("Button4") ToolBar.Buttons.Add("Button5") ToolBar.ShowText = true with (FileMenu.Add("Open","CTRL+O")) { OnExecute = OpenFile } FileMenu.Add("-") with (FileMenu.Add("Exit","ESC")) { OnExecute = CloseForm } HelpMenu = MenuBar.Menu.Add("Help") with (HelpMenu.Add("Help","F1")) { OnExecute = Help } f.Show() o.Run() function CloseForm(Sender) { f.Close() } function OpenFile(Sender) { //Some code... } function Help(Sender) { //Some code... }
IDispatch* RW Menu |
The Action object that represents the menu.