I continue my ABMaterial trials and sometimes I found something strange:
I have tried to use an ABMInput disabled to make use of the autolabeled feature of ABMInput.
Being only-disp fields I tried the ABM.INPUT_TEXTALIGNED_CENTER option.
The result is different than expected:
This is the code I added to the standard Standard Template Project:
As you can see the option works different than expected, but the boxed result should be nice if setted with a proper command and sized correctly.
Someone can help me?
thank you.
Roberto
I have tried to use an ABMInput disabled to make use of the autolabeled feature of ABMInput.
Being only-disp fields I tried the ABM.INPUT_TEXTALIGNED_CENTER option.
The result is different than expected:
This is the code I added to the standard Standard Template Project:
B4X:
Sub ConnectPage()
' See the ABMPageTemplate for the tutorial!
ABMShared.ConnectNavigationBar(page)
' add header
page.Cell(1,1).AddComponent(ABMShared.BuildLabel(page, "hdr1", "About / Help Landing Page", ABM.SIZE_H3, "",0,""))
page.Cell(3,1).AddComponent(ABMShared.BuildLabel(page, "hdr2", "Not much to see here... Click on 'Template Page' in Navigation Bar!", ABM.SIZE_H5, "",0,""))
page.Cell(5,1).AddComponent(ABMShared.BuildLabel(page, "hdr3", "NOTE: Currently, Only About and Template In The Nav Bar Expose Any Pages!", ABM.SIZE_H5, "lbltheme2",0,""))
'test
Dim txFie61, txFie62, txFie71, txFie72 As ABMInput
txFie61.Initialize(page,"txFie61",ABM.INPUT_text,"field 61",False,"")
txFie61.Enabled = False
txFie61.Text = "1234567890"
page.Cell(6,1).AddComponent(txFie61)
txFie62.Initialize(page,"txFie62",ABM.INPUT_text,"field 62",False,"")
txFie62.Enabled = False
txFie62.Text = "1234567890 1234567890 1234567890"
page.Cell(6,2).AddComponent(txFie62)
txFie71.Initialize(page,"txFie71",ABM.INPUT_TEXTALIGN_CENTER,"field 71",False,"")
txFie71.Enabled = False
txFie71.Text = "1234567890"
page.Cell(7,1).AddComponent(txFie71)
txFie72.Initialize(page,"txFie72",ABM.INPUT_TEXTALIGN_CENTER,"field 72",False,"")
txFie72.Enabled = False
txFie72.Text = "1234567890 1234567890 1234567890"
page.Cell(7,2).AddComponent(txFie72)
page.Refresh ' IMPORTANT
' NEW, because we use ShowLoaderType=ABM.LOADER_TYPE_MANUAL
page.FinishedLoading 'IMPORTANT
End Sub
public Sub BuildPage()
' initialize the theme
BuildTheme
page.InitializeWithTheme(Name, "/ws/" & ABMShared.AppName & "/" & Name, False, ABMShared.SessionMaxInactiveIntervalSeconds, theme)
' show the spinning cicles while page is loading....
page.ShowLoader=True
page.PageHTMLName = "index.html"
page.PageTitle = "" ' You can also set this as a property in "ABMShared.BuildNavigationBar" below...
' Google SEO stuff...
page.PageDescription = ""
page.PageKeywords = ""
page.PageSiteMapPriority = ""
page.PageSiteMapFrequency = ABM.SITEMAP_FREQ_YEARLY
' faint green dot (on title bar) when connected - red when not connected with web socket
page.ShowConnectedIndicator = True
ABMShared.BuildNavigationBar(page, "My {B} About Page {/B} ", "../images/logo.png", "", "", "")
page.AddRowsM( 5, True, 0, 10, "").AddCellsOSMP( 1, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, "")
page.AddRows(2,True,"").AddCellsOSMP(2,0,0,0,6,6,6,0,0,0,0,"")
'IMPORTANT - Build the Grid before you start adding components ( with ConnectPage()!!! )
page.BuildGrid
End Sub
Someone can help me?
thank you.
Roberto