Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private MB As MenuBar
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MB.Initialize("MB")
MainForm.RootPane.AddNode(MB,0,0,MainForm.RootPane.PrefWidth,20)
MainForm.Show
Dim FileM As Menu
FileM.Initialize("File","Menu")
Dim FileOpen As MenuItem
FileOpen.Initialize("Open","Menu")
FileM.MenuItems.Add(FileOpen)
MB.Menus.Add(FileM)
End Sub
Private Sub MainForm_Resize (Width As Double, Height As Double)
MB.PrefWidth = Width
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Private Sub Menu_Action
Dim MI As MenuItem = Sender
Select MI.Text
Case "Open"
Log("Open Menu Action")
End Select
End Sub