Seems like none of the TextAlign constants seem to work with TextFields, like Labels.
Here's my code:
in the Page...
B4X:
Dim UserInfoLabel1 As ABMLabel
UserInfoLabel1.Initialize(page,"user_info_label_1", "First Name :", ABM.SIZE_SMALL, False, "LeftUserInfoLabel")
UserProfileFormLeftSubContainer.Cell(1,1).AddComponent(UserInfoLabel1)
It looks like the tag <small> can not do it: ABM.SIZE_SMALL. reason, it has no full cell width like for example a <p> or a <h1> have.
Two possibilities:
1. Change the size
2. Set it on cell level:
B4X:
theme.AddCellTheme("right")
theme.Cell("right").Align = ABM.CELL_ALIGN_RIGHT
Dim UserInfoLabel1 As ABMLabel
UserInfoLabel1.Initialize(page,"user_info_label_2", "First Name :", ABM.SIZE_SMALL, False, "")
page.Cell(1,1).UseTheme("right") ' or do it in the grid declaration
page.Cell(1,1).AddComponent(UserInfoLabel1)
As a side note: do NOT use _ in the ID names, it can cause troubles that are very hard to track once your page comes complex.
It looks like the tag <small> can not do it: ABM.SIZE_SMALL. reason, it has no full cell width like for example a <p> or a <h1> have.
Two possibilities:
1. Change the size
2. Set it on cell level:
B4X:
theme.AddCellTheme("right")
theme.Cell("right").Align = ABM.CELL_ALIGN_RIGHT
Dim UserInfoLabel1 As ABMLabel
UserInfoLabel1.Initialize(page,"user_info_label_2", "First Name :", ABM.SIZE_SMALL, False, "")
page.Cell(1,1).UseTheme("right") ' or do it in the grid declaration
page.Cell(1,1).AddComponent(UserInfoLabel1)
As a side note: do NOT use _ in the ID names, it can cause troubles that are very hard to track once your page comes complex.
I have tried Cell level, and it shifts the cell to the right… in my case the text = "First Name:" becomes ":First Name". I also have tried changing the text size and it seems to not work too!
I would have sworn I had tried it, but i came to understand that I was trying to define the theme in the label.initialize method, while trying to set a cell theme!
"serves you right"! 'loud thinking'