Android Question CsBuilder FontSize

ykucuk

Well-Known Member
Licensed User
Longtime User
B4X:
cs.Initialize.Font(Font.CreateNew(45)).Append("Some Text").Pop

I am using CsBuilder to create text, and while I can change properties such as color, alignment, and font, I cannot adjust the font size. I took sample code from Erel's examples, but the situation remains the same. Interestingly, it works fine if I select the label in the designer and change the text size there. What am I doing wrong?
 

toby

Well-Known Member
Licensed User
Longtime User
You can use relativeSize() as follows
increase size by 50%:
cs.Initialize.Font(Font.CreateNew(45)).RelativeSize(1.5).Append("Some Text").PopAll
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
or Size()
B4X:
cs.Initialize.Size(18).Append("Some Text").PopAll '18 is actual size not dip units'
 
Upvote 0

ykucuk

Well-Known Member
Licensed User
Longtime User
or Size()
B4X:
cs.Initialize.Size(18).Append("Some Text").PopAll '18 is actual size not dip units'
Unknow member : size
 

Attachments

  • Screenshot 2023-10-14 at 1.50.04 PM.png
    Screenshot 2023-10-14 at 1.50.04 PM.png
    28.3 KB · Views: 35
Upvote 0
Top