'Code module
#Region Project Attributes
#ApplicationLabel: Test
#Version: 1.0.0
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations: Portrait, PortraitUpsideDown
#iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#MinVersion: 9.3
#Target: iPhone, iPad
#ATSEnabled: True
#End Region
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 bb1,bb2, bbspace As BarButton
Private PnlBB1 As Panel
Private LblBB1b As Label
Private LblBB1a As Label
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.RootPanel.LoadLayout("Page1")
NavControl.ShowPage(Page1)
NavControl.ToolBarVisible=True
NavControl.NavigationBarVisible=False
' this work, one item on the left
bb1.InitializeCustom(PnlBB1)
Page1.ToolbarButtons.AddAll(Array As Object(bb1))
'
' this does not work, I obtain just one item on the right
' bb1.InitializeCustom(PnlBB1)
' bb2.InitializeCustom(PnlBB1)
' Page1.ToolbarButtons.AddAll(Array As Object(bb1,bb2))
'
' this does not work also, I tried to add a space between buttons
' bb1.InitializeCustom(PnlBB1)
' bb2.InitializeCustom(PnlBB1)
' bbspace.InitializeSystem(bbspace.ITEM_FLEXIBLE_SPACE, "")
' Page1.ToolbarButtons.AddAll(Array As Object(bb1,bbspace,bb2))
'
end Sub