Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private xui As XUI
Private xview As B4XView
Private prefdlg As PreferencesDialog
Private prefdlgdata As Map
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.RootPanel.LoadLayout("Page1")
NavControl.ShowPage(Page1)
prefdlg_Create
End Sub
private Sub prefdlg_Create
Dim varList As List
varList.Initialize
varList.Add("Item 1")
varList.Add("Item 2")
varList.Add("Item 3")
varList.add("Item 4")
prefdlgdata.Initialize
prefdlg.Initialize(Page1.RootPanel,"New entry",300dip,250dip)
prefdlg.AddOptionsItem("event","Event",varList)
prefdlg.GetPrefItem("event").Required=True
prefdlg.AddDateItem("date","Date")
prefdlg.AddTimeItem("time","Time")
prefdlg.AddTextItem("note","Note")
End Sub
Sub Button1_Click
Dim varPdlg As Object = prefdlg.ShowDialog(prefdlgdata, "insert", "cancel")
prefdlg.Dialog.Base.Top = 300
Wait For (varPdlg) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
End If
End Sub