Setting Button Text Color

rfresh

Well-Known Member
Licensed User
Longtime User
How do I set the color of the text on a button?

This does not work:

B4X:
btn_Indoor.TextColor = "#808080"

Thanks...
 

joseluis

Active Member
Licensed User
Longtime User
TextColor receives an Int, not a string. You usually do it like this:

btn_Indoor.TextColor = Colors.Blue

or...

btn_Indoor.TextColor = Colors.RGB(200,45,100)

or...

btn_Indoor.TextColor = Colors.ARGB(100,100,0,200)
 
Upvote 0

rfresh

Well-Known Member
Licensed User
Longtime User
Is there a reference for text styles? I notice once I set it to Bold it remains in Bold but I need to set it back to Normal at some point.
 
Upvote 0
Top