T Tomas Petrus Active Member Licensed User Longtime User Aug 23, 2018 #1 Hi guys when I create toolbar buttons in code I can change their text color this way Code: Copy bbt1.TintColor = ..... But when I create normal Button in designer I am not able to change TintColor in code color of the button no prob, text of the button no prob but tintcolor just doesnt have any effect. No TextColor exist in code on Button object so I always see the color I setup in designer. I need to generate a lot of things dynamicaly even those colors. only solution I see now is to recreate this button in code and delete it from designer. thx for help
Hi guys when I create toolbar buttons in code I can change their text color this way Code: Copy bbt1.TintColor = ..... But when I create normal Button in designer I am not able to change TintColor in code color of the button no prob, text of the button no prob but tintcolor just doesnt have any effect. No TextColor exist in code on Button object so I always see the color I setup in designer. I need to generate a lot of things dynamicaly even those colors. only solution I see now is to recreate this button in code and delete it from designer. thx for help
Giusy Active Member Licensed User Aug 23, 2018 #2 Hi in designer you can choice textcolor, it's what you want? Attachments button.PNG 10.1 KB · Views: 610 Upvote 0
T Tomas Petrus Active Member Licensed User Longtime User Aug 23, 2018 #3 The problem is I need to set color in the code for various reasons. I cannot do it dynamicaly in designer. all other parameters I can change in the code just this one doesnt work Upvote 0
The problem is I need to set color in the code for various reasons. I cannot do it dynamicaly in designer. all other parameters I can change in the code just this one doesnt work
Giusy Active Member Licensed User Aug 23, 2018 #4 My be this? SetButtonTextColor(Btn1, Colors.Yellow, 0) Upvote 0
T Tomas Petrus Active Member Licensed User Longtime User Aug 23, 2018 #5 how exactly ? Attachments btncolor.png 89.3 KB · Views: 522 Upvote 0
Giusy Active Member Licensed User Aug 23, 2018 #6 If OdeslatBtn is the name of the button: SetButtonTextColor(OdeslatBtn,Colors.Yellow,0) Upvote 0
Sandman Expert Licensed User Longtime User Aug 23, 2018 #7 It might be worth mentioning that SetButtonTextColor isn't builtin in B4i. It's a sub that Erel provided here: https://www.b4x.com/android/forum/threads/button-textcolor.47640/#post-302295 Upvote 0
It might be worth mentioning that SetButtonTextColor isn't builtin in B4i. It's a sub that Erel provided here: https://www.b4x.com/android/forum/threads/button-textcolor.47640/#post-302295