Public Sub BuildMsgBox() As ABMModalSheet
Dim msgbox As ABMModalSheet
msgbox.Initialize(page, "msgbox", False, False, "")
msgbox.IsDismissible = False
msgbox.Content.AddRowsM(1, True,0,0, "").AddCells12(1, "")
msgbox.Content.BuildGrid
' add paragraph
msgbox.Content.CellR(0,1).AddComponent(ABMShared.BuildParagraph(page,"par1","message") )
msgbox.Footer.AddRowsM(1,True,0,0, "").AddCellsOS(1,6,6,6,3,3,3,"").AddCellsOS(1,0,0,0,3,3,3, "")
msgbox.Footer.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
' create the buttons for the footer
Dim msgok As ABMButton
msgok.InitializeFlat(page, "msgok", "", "", "CLOSE", "transparent")
msgbox.Footer.Cell(1,1).AddComponent(msgok)
Return msgbox
End Sub
Public Sub BuildMsgBoxYesNo() As ABMModalSheet
Dim msg As ABMModalSheet
msg.Initialize(page, "confirm", False, False, "")
msg.IsDismissible = False
msg.Content.AddRowsM(1, True,0,0, "").AddCells12(1, "")
msg.Content.BuildGrid
' add paragraph
msg.Content.CellR(0,1).AddComponent(ABMShared.BuildParagraph(page,"par1","Are you sure you want to delete this user?") )
msg.Footer.AddRowsM(1,True,0,0, "").AddCellsOS(1,6,6,6,3,3,3,"").AddCellsOS(1,0,0,0,3,3,3, "")
msg.Footer.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
' create the buttons for the footer
Dim msgyes As ABMButton
msgyes.InitializeFlat(page, "msgyes", "", "", "YES", "transparent")
msg.Footer.Cell(1,1).AddComponent(msgyes)
Dim msgno As ABMButton
msgno.InitializeFlat(page, "msgno", "", "", "NO", "transparent")
msg.Footer.Cell(1,2).AddComponent(msgno)
Return msg
End Sub
Public Sub BuildWrongInputModalSheet() As ABMModalSheet
Dim myModalError As ABMModalSheet
myModalError.Initialize(page, "wronginput", False, False, "")
myModalError.Content.UseTheme("modalcontent")
myModalError.Footer.UseTheme("modalcontent")
myModalError.IsDismissible = True
' create the grid for the content
myModalError.Content.AddRows(1,True, "").AddCells12(1,"")
myModalError.Content.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
Dim lbl1 As ABMLabel
lbl1.Initialize(page, "errormsg", "The login or password are incorrect!",ABM.SIZE_PARAGRAPH, False, "")
myModalError.Content.Cell(1,1).AddComponent(lbl1)
Return myModalError
End Sub
Public Sub ShowMsgBox(strMessage As String)
Dim msgbox As ABMModalSheet = page.ModalSheet("msgbox")
Dim lbl As ABMLabel = msgbox.Content.Component("par1")
lbl.Text = strMessage
page.ShowModalSheet("msgbox")
End Sub
Public Sub ShowYesNo(strMessage As String, strYes As String, strNo As String)
Dim msg As ABMModalSheet = page.ModalSheet("confirm")
Dim lbl As ABMLabel = msg.Content.Component("par1")
Dim msgyes As ABMButton = msg.Footer.Component("msgyes")
Dim msgno As ABMButton = msg.Footer.Component("msgno")
lbl.Text = strMessage & "?"
msgyes.Tag = strYes
msgno.Tag = strNo
page.ShowModalSheet("confirm")
End Sub
Public Sub msgyes_Clicked(Target As String)
Dim msg As ABMModalSheet = page.ModalSheet("confirm")
Dim msgyes As ABMButton = msg.Footer.Component("msgyes")
Dim strTag As String
strTag = msgyes.Tag
page.CloseModalSheet("confirm")
End Sub
Public Sub msgok_Clicked(Target As String)
page.CloseModalSheet("msgbox")
End Sub
Public Sub msgno_Clicked(Target As String)
page.CloseModalSheet("confirm")
End Sub
Public Sub ShowInputError(strMessage As String)
Dim mymodalError As ABMModalSheet = page.ModalSheet("wronginput")
Dim myModalLbl As ABMLabel= mymodalError.Content.Component("errormsg")
myModalLbl.Text = strMessage
page.ShowModalsheet("wronginput")
End Sub