B4J Question How to set padding in textfield? (programmaticaly)

Marc De Loose

Member
Licensed User
Longtime User
I just dont find a way

this does not remove the padding on the top and bottom: CSSUtils.SetStyleProperty(mTxtV.As(TextField), "-fx-padding", "0 0 0 0")
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
1731219363507.png


B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    CSSUtils.SetStyleProperty(TextField1, "-fx-padding", "0 0 0 0") '(no need to cast B4XView)
    TextField1.SetTextAlignment("TOP", "LEFT")
    TextField1.Text = "Aaa"
End Sub
 
Upvote 0
Top