Y ykucuk Well-Known Member Licensed User Longtime User Oct 14, 2023 #1 Code: Copy 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?
Code: Copy 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 Oct 14, 2023 #2 You can use relativeSize() as follows Code: Copy cs.Initialize.Font(Font.CreateNew(45)).RelativeSize(1.5).Append("Some Text").PopAll Upvote 0
You can use relativeSize() as follows Code: Copy cs.Initialize.Font(Font.CreateNew(45)).RelativeSize(1.5).Append("Some Text").PopAll
toby Well-Known Member Licensed User Longtime User Oct 14, 2023 #3 or Size() B4X: Copy cs.Initialize.Size(18).Append("Some Text").PopAll '18 is actual size not dip units' Upvote 0
or Size() B4X: Copy cs.Initialize.Size(18).Append("Some Text").PopAll '18 is actual size not dip units'
Y ykucuk Well-Known Member Licensed User Longtime User Oct 14, 2023 #4 toby said: or Size() B4X: Copy cs.Initialize.Size(18).Append("Some Text").PopAll '18 is actual size not dip units' Click to expand... Unknow member : size Attachments Screenshot 2023-10-14 at 1.50.04 PM.png 28.3 KB · Views: 424 Upvote 0
toby said: or Size() B4X: Copy cs.Initialize.Size(18).Append("Some Text").PopAll '18 is actual size not dip units' Click to expand... Unknow member : size
toby Well-Known Member Licensed User Longtime User Oct 14, 2023 #5 Which version of B4a are you using? It works for me as shown below. Upvote 0