Change Color of RadioButton/CheckBox

dank

Member
Licensed User
Longtime User
Hi. I've been using B4A for several months, and I can't tell you how much fun I'm having programming again!

My first question to the group: the end-users of my app want a different color to indicate when a radio button or check box has been pressed. Can I change the color from green to black, red, etc?

Thanks!
 

specci48

Well-Known Member
Licensed User
Longtime User
CheckBoxes and RadioButtons support the CheckedChange event.
Within this event you can change the color of the background or/and text.

E.g.:
B4X:
Sub CheckBox1_CheckedChange(Checked As Boolean)
   If Checked = True Then
      CheckBox1.TextColor = Colors.Red
      CheckBox1.Color = Colors.DarkGray
   Else 
      CheckBox1.TextColor = Colors.Green
      CheckBox1.Color = Colors.Gray
   End If   
End Sub


specci48
 
Upvote 0

dank

Member
Licensed User
Longtime User
The trouble is the dot in the middle of the radio button is still green. Can that color be changed? I suspect that I'll end up using your code instead. Thanks for your help!
 
Upvote 0
Top