rfresh Well-Known Member Licensed User Longtime User Mar 1, 2012 #1 How do I set the color of the text on a button? This does not work: B4X: btn_Indoor.TextColor = "#808080" Thanks...
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 Mar 1, 2012 #2 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
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)
rfresh Well-Known Member Licensed User Longtime User Mar 1, 2012 #3 How about TextStyle set to Bold? Thank you... Upvote 0
nfordbscndrd Well-Known Member Licensed User Longtime User Mar 1, 2012 #4 rfresh said: How about TextStyle set to Bold? Thank you... Click to expand... btn_Indoor.Typeface = Typeface.DEFAULT_BOLD But see this post: http://www.b4x.com/forum/basic4andr...11542-typeface-doesnt-change-real-device.html Last edited: Mar 1, 2012 Upvote 0
rfresh said: How about TextStyle set to Bold? Thank you... Click to expand... btn_Indoor.Typeface = Typeface.DEFAULT_BOLD But see this post: http://www.b4x.com/forum/basic4andr...11542-typeface-doesnt-change-real-device.html
M Mahares Expert Licensed User Longtime User Mar 1, 2012 #6 btn_indoor.Typeface=Typeface.STYLE_BOLD Upvote 0
rfresh Well-Known Member Licensed User Longtime User Mar 1, 2012 #7 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
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.
M Mahares Expert Licensed User Longtime User Mar 1, 2012 #8 btn_indoor.Typeface=Typeface.STYLE_NORMAL Upvote 0
nfordbscndrd Well-Known Member Licensed User Longtime User Mar 1, 2012 #9 rfresh said: 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. Click to expand... Constants - Basic4android Wiki Upvote 0
rfresh said: 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. Click to expand... Constants - Basic4android Wiki
rfresh Well-Known Member Licensed User Longtime User Mar 1, 2012 #10 Mahares said: btn_indoor.Typeface=Typeface.STYLE_NORMAL Click to expand... I couldn't get that to work but this syntax worked: B4X: btn_indoor.Typeface=Typeface.DEFAULT Upvote 0
Mahares said: btn_indoor.Typeface=Typeface.STYLE_NORMAL Click to expand... I couldn't get that to work but this syntax worked: B4X: btn_indoor.Typeface=Typeface.DEFAULT
Erel B4X founder Staff member Licensed User Longtime User Mar 2, 2012 #11 About the color, you can use: B4X: btn_Indoor.TextColor = 0xFF808080 The first two FF are for the alpha value. Upvote 0
About the color, you can use: B4X: btn_Indoor.TextColor = 0xFF808080 The first two FF are for the alpha value.