public Sub BuildPage()
' initialize the theme
BuildTheme
Log ("BuildPage()")
' initialize this page using our theme
page.InitializeWithTheme(Name, "/ws/" & AppName & "/" & Name, False, theme)
page.ShowLoader=True
page.PageHTMLName = "EasyImages.html"
page.PageTitle = "Bildhantering"
page.PageDescription = "Editering"
page.PageKeywords = ""
page.PageSiteMapPriority = "0.50"
page.PageSiteMapFrequency = ABM.SITEMAP_FREQ_YEARLY
' adding a navigation bar
ABMShared.BuildNavigationBar(page, "Bildhantering","../images/gisiqon_logo.jpg", "", "EasyImages", "")
page.AddRows(1,True, "").AddCells12(1,"")
page.AddRowsM(3,True,0,0, "").AddCellsOS(4,0,0,0,3,3,3,"")
page.AddRowsM(1,True,0,0,"").AddCellsOS(1,0,0,0,12,12,12,"")
page.AddRowsM(20,True,0,0, "").AddCellsOS(4,0,0,0,3,3,3,"")
' page.AddRowsM(20, True, 0, 0, "").AddCellsOS(4,0,0,0, 3,3,3,"")
page.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
Dim btn2 As ABMButton
btn2.InitializeRaised(page, "btn2", "", "", "Remove all Markers", "bluegrey")
page.Cell(2,2).AddComponent(btn2)
page.CellR(1,1).AddComponent(ABMShared.BuildParagraph(page,"par1"," ") )
Dim lDir As List
Dim sImg As String
Dim iLen As Int
Dim sID As String
Dim j As Int
Dim iOffs As Int
'load images in a list
lDir.Initialize
lDir = WebUtils.PopImagesInList("Standard", Main.PG_sAppPath & "\EasyImages\images")
iLen = lDir.Size
Dim Images(iLen) As ABMImage
Dim iRow As Int = 2
If Main.PG_bChks Then ' Is true if Editing is selected
Dim chk1(iLen) As ABMCheckbox
End If
j = 1
iOffs = 4
Log ("Main.PG_bChks " & Main.PG_bChks)
For i = 0 To iLen - 1
sImg = lDir.Get(i)
If sImg.StartsWith("20") Then
sID = jStrings.ChangeToShortImageID(sImg, 2)
Images(i).Initialize(page, sID, "../EasyImages/images/" & sImg, 1)
Images(i).IsResponsive=True
Images(i).SetFixedSize(300, 200)
Images(i).IsMaterialBoxed = True
Images(i).SetTooltip(Images(i).ID, "", 300)
If j > 4 Then
j = 1
iRow = iRow + 1
End If
page.Cell(iRow + iOffs, j).AddComponent(Images(i))
If Main.PG_bChks Then ' Is true if Editing is selected
chk1(i).Initialize(page, "chk" & i, "Markera", False, "")
page.Cell(iRow + iOffs, j).AddComponent(chk1(i))
End If
j = j + 1
End If
Next
End Sub
Sub PageClear
If Main.PG_bChks Then ' Is true if Editing is selected
For i = 1 To 20
Try
page.Row(i).refresh
Catch
End Try
Next
Log ("Cleared")
End If
End Sub