### MenuBar Simple Example

MenuBar Simple Example
MenuItems
File
New
Save
Exit
Edit
Copy
Paste
Cut
Help
About
Visual Designer MenuBar Properties > Menu Items JSON String
[
{Text: "_File",
Children:
[
{Text:"_New", Tag:"FileNew", EventName: "FileNew"},
{Text: "_Save", Tag:"FileSave", EventName: "FileSave"},
{Text: "_Exit", Tag:"FileExit", EventName: "FileExit"}
]
},
{Text: "_Edit",
Children:
[
{Text:"_Copy", Tag:"EditCopy", EventName: "EditCopy"},
{Text:"_Paste", Tag:"EditPaste", EventName: "EditPaste"},
{Text:"_Cut", Tag:"EditCut", EventName: "EditCut"}
]
},
{Text: "_Help",
Children:
[
{Text: "_About", Tag: "HelpAbout", EventName: "HelpAbout"}
]
}
]
B4J Events
Note: Not all events are defined.
`Sub FileNew_Action
Log("FileNew clicked.")
End Sub`
`Sub FileSave_Action
Log("FileSave clicked.")
End Sub`
`Sub FileExit_Action
Log("FileExit clicked.")
ExitApplication
End Sub`
`Sub HelpAbout_Action
Log("HelpAbout clicked.")
End Sub`
Output Example
FileNew clicked.
FileSave clicked.
FileExit clicked.
...

Changed: , Category: Visual Designer, File: T6C276M2051.htm, ID: 2051