Sub BuildCustomModalSheet() As ABMModalSheet
Dim myModal As ABMModalSheet
myModal.Initialize(page, "printqr", True, ABM.MODALSHEET_TYPE_NORMAL, "modalsheet")
myModal.Content.UseTheme("modalsheet")
myModal.Footer.UseTheme("snapchat")
myModal.Size = ABM.MODALSHEET_SIZE_NORMAL
myModal.MaxHeight = "80%"
myModal.MaxWidth = "35%"
myModal.IsDismissible = False
' create the grid for the content
'''myModal.Content.AddRows(1,True, "").AddCells12(5,"centre")
myModal.Content.AddRowsV(1, True, ABM.VISIBILITY_ALL, "centre").AddCellsOS(1, 4, 4, 4, 6, 6, 6, "centre")
' ALAIN: Add one row with one cell. We will add all our Field containers in this cell
' this way, we do not have to add rows dynamically
myModal.Content.AddRows(1,True, "centre").AddCellsOSMPV(1,3,3,3,6,6,6,0,0,0,0,ABM.VISIBILITY_ALL, "centre")
myModal.Content.AddRows(1,True, "centre").AddCellsOS(1,3,3,3,6,6,6, "centre")
myModal.Content.addrows(1,True,"").AddCellsOSV(1,3,3,3,3,3,3,ABM.VISIBILITY_ALL,"").AddCellsOSV(1,1,1,1,3,3,3,ABM.VISIBILITY_ALL,"")
myModal.Content.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
Log("encrypt: " & encrypt($"Type=${mtype}&Model=${model}&SerialNO=${serialno}"$))
Dim encrypted As String = encrypt($"Type=${mtype}&Model=${model}&SerialNO=${serialno}"$)
'''Dim equiptmentqr As QRCodeGenerator
Dim equiptmentqr As QRCodeGenerator2
Dim murl As String
Dim su As StringUtils
murl = encyptedurl
equiptmentqr.Initialize(page, "equipqr", murl&encrypted, 256)
myModal.Content.Cell(2, 1).AddComponent(equiptmentqr.ABMComp)
Dim option1 As ABMRadioGroup
option1.Initialize(page, "labelsize", "radio")
option1.Title = "Select Label Size"
option1.AddRadioButtonNoLineBreak("50x50 mm", True)
option1.AddRadioButton("50x25 mm", True)
option1.SetActive(1)
myModal.Content.SetBorderex(ABM.COLOR_BLACK, ABM.INTENSITY_DARKEN2, 2, ABM.BORDER_GROOVE, "20px")
myModal.Content.Cell(3,1).AddComponent(option1)
myModal.Content.Cell(3,1).Refresh
' create the buttons for the footer
Dim msbtn1 As ABMButton
msbtn1.InitializeFlat(page, "qrprint", "", "", "PRINT", "footerbutton")
msbtn1.UseFullCellWidth = True
myModal.Content.Cell(4,1).AddComponent(msbtn1)
myModal.Content.Cell(4,1).UseTheme("centre")
Dim msbtn2 As ABMButton
msbtn2.InitializeFlat(page, "qrclose", "", "", "CANCEL", "footerbutton")
msbtn2.UseFullCellWidth = True
myModal.Content.Cell(4,2).AddComponent(msbtn2)
myModal.Content.Cell(4,2).UseTheme("centre")
Return myModal
End Sub