iOS Question Button Text Margin Settings

Saeed Qatari

Member
Licensed User
Yes, it is by default the text aligned in the center. I have aligned the text to the left and appears without a margin, so I am trying to add a margin to the left and also to the right with a multiline set to true.
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Actually, not very difficult. For example, left-top aligned multiline text
B4X:
    Dim no As NativeObject
    no = Button1
    no.GetField ("titleLabel").SetField ("lineBreakMode", 0) ' WordWrap
    no.SetField ("contentHorizontalAlignment", 1) ' Left
    no.SetField ("contentVerticalAlignment", 1) ' Top    
    no.RunMethod ("setContentEdgeInsets:", Array (no.MakeEdgeInsets (50, 20, 50, 20)))
 
Upvote 0
Top