B4J Question Create Label & Set Text Alignment In Code

margret

Well-Known Member
Licensed User
Longtime User
I am trying to complete some library conversions to B4J and have some questions. I am creating a label in code then trying to set the text alignment in code. So far, I have found no option to do this. Am I overlooking something? I see no option to set gravity or align TOP, BOTTOM, etc.

Thanks for any help.
 

Daestrum

Expert
Licensed User
Longtime User
I believe it is done with the Style parameter of the control - using the '-fx-...' attributes.
eg
label1.Style = "-fx-text-alignment: justify"
 
Upvote 0
Top