Android Question Make a check box read only without disabling?

Tony Tetley

Member
Licensed User
I want to use check boxes to show some true/false values but I do not want the user to be able to change the value. If I disable the check box it is dimmed out and too hard to see. Is it possible to make a check box enabled but read only, or am I going to have to do a click event on each of them to keep the true/false state?

Thanks,
Tony
 

RandomCoder

Well-Known Member
Licensed User
If you have several it might be easier to place a transparent panel over the top of the check boxes. This should then be able to consume the click event instead of it reaching the check boxes. I'm pretty sure it will work.
 

NJDude

Expert
Licensed User
Yes!! adding the panel click event doe the trick. Thanks.
Not the click but the TOUCH just like indicated below, otherwise you might get the clicking sound too:
B4X:
Sub Panel1_Touch(Action As Int, X As Float, Y As Float)
End Sub
 
Top