iOS Question Change Button text size by code

Mike1970

Well-Known Member
Licensed User
Longtime User
How can i change text size of a button by code?
I tried with: btn.CustomLabel.??? but after customlabel i don't find anything that can premit to me to change the text size
(the text its actually fontawesome)
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
In iOS the Font size is a part of the Font Object so you would normally do something like.
B4X:
btn.CustomLabel.Font = Font.CreateNew2("<FontName>",<FontSize>)
or
B4X:
btn.CustomLabel.Font = Font.CreateFontAwesome(<FontSize>)
You can store the Font in a global variable and re-use if you prefer.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
In iOS the Font size is a part of the Font Object so you would normally do something like.
B4X:
btn.CustomLabel.Font = Font.CreateNew2("<FontName>",<FontSize>)
or
B4X:
btn.CustomLabel.Font = Font.CreateFontAwesome(<FontSize>)
You can store the Font in a global variable and re-use if you prefer.


Ok thanks, i will try it later :D
 
Upvote 0
Top