Sub BuildMainMenuItem( page As ABMPage, id As String, BorderColor As String, BorderStyle As String, MenuItemTitle As String, MenuItemDescription As String, FilePath As String, ThemeName As String) As ABMContainer
LogError(id & " Theme is : " & ThemeName)
Dim MainMenuItemContainer As ABMContainer
MainMenuItemContainer.Initialize(page, id & "MainMenuItemContainer","")
MainMenuItemContainer.SetFixedHeight("84px")
MainMenuItemContainer.AddRowsM(1,False,0,0,"").AddCellsOSMP(1,0,0,0,3,3,3,0,0,0,0,"").AddCellsOSMP(1,0,0,0,9,9,9,0,0,0,0,"")
MainMenuItemContainer.BuildGrid ' IMPORTANT!
MainMenuItemContainer.SetBorderEx(BorderColor, ABM.INTENSITY_LIGHTEN4, 2, BorderStyle, "100px")
MainMenuItemContainer.Row(1).UseTheme(ThemeName & "Container")
Dim MainMenuItemSubContainer As ABMContainer
MainMenuItemSubContainer.Initialize(page, "MainMenuItemSubContainer","")
MainMenuItemSubContainer.AddRowsM(1,False,0,0,"").AddCells12(2,"")
MainMenuItemSubContainer.BuildGrid ' IMPORTANT!
MainMenuItemContainer.Cell(1,2).AddComponent(MainMenuItemSubContainer)
Dim MenuItemTitleLabel As ABMLabel
MenuItemTitleLabel.Initialize(page, id & "Title", MenuItemTitle, ABM.SIZE_H5, False, "")
MainMenuItemSubContainer.Cell(1,1).AddComponent(MenuItemTitleLabel)
MenuItemTitleLabel.UseTheme( ThemeName & "Title")
Dim MenuItemDescriptionLabel As ABMLabel
MenuItemDescriptionLabel.Initialize(page, id & "Description", MenuItemDescription, ABM.SIZE_SMALL, False, "")
MainMenuItemSubContainer.Cell(1,2).AddComponent(MenuItemDescriptionLabel)
MenuItemDescriptionLabel.UseTheme( ThemeName & "Description")
Dim MenuItemImage As ABMImage
MenuItemImage.Initialize(page, id, FilePath, 1.0)
MenuItemImage.SetFixedSize(80,80)
MenuItemImage.IsCircular = True
MainMenuItemContainer.Cell(1,1).AddComponent(MenuItemImage)
Return MainMenuItemContainer
End Sub