Sub Process_Globals
Private pg As Page
Public clickValue As String
Public clickIndex As String
Private ashMonths As ActionSheet
Private lblSveciTest As Label
Private clvKalendar As CustomListView
End Sub
Public Sub Show
' If pg.IsInitialized = False Then
pg.Initialize("pg")
pg.RootPanel.LoadLayout("Kalendar")
' End If
Main.NavControl.ShowPage(pg)
Main.NavControl.NavigationBarVisible = True
Main.NavControl.ToolBarVisible = True
pg.Title = "Katolički kalendar"
Dim nobj As NativeObject = Main.tbc
nobj.GetField("tabBar").SetField("tintColor", nobj.ColorToUIColor(Colors.Red)) 'active item
nobj.GetField("tabBar").SetField("barTintColor", nobj.ColorToUIColor(Colors.Green)) 'bar color
ashMonths.Initialize("ashMonths", "", "Cancel", "", Array As String("Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"))
Dim bbtBack As BarButton
bbtBack.InitializeSystem(bbtBack.ITEM_REPLY, "back")
bbtBack.TintColor = Colors.White
pg.TopLeftButtons = Array(bbtBack)
Dim bbtBCK, bbtFWD, bbtMjesec, bbtFlex1, bbtFlex2 As BarButton
' Initialize the buttons
bbtFlex1.InitializeSystem(bbtFlex1.ITEM_FLEXIBLE_SPACE, "")
bbtFlex2.InitializeSystem(bbtFlex2.ITEM_FLEXIBLE_SPACE, "")
bbtBCK.InitializeBitmap(LoadBitmap(File.DirAssets, "backward2b.png"), "BCK")
bbtFWD.InitializeBitmap(LoadBitmap(File.DirAssets, "forward2b.png"), "FWD")
bbtMjesec.InitializeText("", "bbtMjesec")
bbtMjesec.SetFont(Font.CreateNew2("Arial-BoldItalicMT", 17))
bbtMjesec.TintColor = Colors.Red
' Add the buttons onto Page pg
pg.ToolbarButtons.AddAll(Array As Object(bbtBCK, bbtFlex1, bbtMjesec, bbtFlex2, bbtFWD))
pg.TabBarItem.SetFont(Font.DEFAULT_ITALIC) ' tried to change font style for test but not working
Populate
clvKalendar.JumpToItem(DateTime.GetDayOfMonth(DateTime.Now)-1) 'jump to current day of month
End Sub