.HorizontalAlignment ?

rfresh

Well-Known Member
Licensed User
Longtime User
How can I set the .HorizontalAlignment property of a Label to Left so the text is flush left within the Label width?

Thanks...
 

jeronimovilar2

Member
Licensed User
Longtime User
two sizes?

Is it possible two size text in a button?

example:
BT.text = "Basic Android"
BT.text.substring2(1,5).size = 10
BT.text.substring2(7,13).size = 20


"basic" with size 10 and "Android" with size 20
 
Upvote 0

ukimiku

Active Member
Licensed User
Longtime User
Your approach won't work.

.substring() and .substring2() are read-only. You cannot assign text to strings like this, neither can you set the text size property like you attempt to do. Try it, your code won't even compile. Strings in B4A are static, you have to rebuild them from scratch every time you want something changed in them.

If you need more flexible strings and (much) faster string handling, use a StringBuilder object.

Maybe (I haven't tried it) you can use the "RichText" library to achieve what you want. I know that you can have differently colored text with that library. I don't know about the sizes.

However, you could overlay a button with two labels, one for the large text and one for the "fine print".

Regards,
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…