gudino jose luis Active Member Licensed User Longtime User Oct 5, 2015 #1 hi How to change the color of "color on" Switch at run time. Thanks.
JonPM Well-Known Member Licensed User Longtime User Oct 5, 2015 #2 Maybe this? https://www.b4x.com/b4i/help/views.html#switch_tintcolor Upvote 0
gudino jose luis Active Member Licensed User Longtime User Oct 5, 2015 #3 hi JonPM I tried the tintColor function, but only changes the border color, not the "ON COLOR" thanks for your help greeting Upvote 0
hi JonPM I tried the tintColor function, but only changes the border color, not the "ON COLOR" thanks for your help greeting
JanPRO Well-Known Member Licensed User Longtime User Oct 5, 2015 #4 B4X: SwitchSetOnTintColor(Switch1,Colors.Blue) Sub SwitchSetOnTintColor(SW As Switch, Color As Int) Dim NaObj As NativeObject = SW NaObj.RunMethod("setOnTintColor:",Array(NaObj.ColorToUIColor(Color))) End Sub Upvote 0
B4X: SwitchSetOnTintColor(Switch1,Colors.Blue) Sub SwitchSetOnTintColor(SW As Switch, Color As Int) Dim NaObj As NativeObject = SW NaObj.RunMethod("setOnTintColor:",Array(NaObj.ColorToUIColor(Color))) End Sub
gudino jose luis Active Member Licensed User Longtime User Oct 5, 2015 #5 excellent, thanks for the explanation greeting Upvote 0