Android Question 3 way check box?

tsteward

Well-Known Member
Licensed User
Longtime User
Is it possible to have a 3 way check box?
As in Unchecked, Positive (Tick) or Negative (Cross)
 

emexes

Expert
Licensed User
Well, there are plenty of no-tick/gray-tick/full-tick examples, so clearly it should be possible. I expect if you generalize a bit further to a multi-state button that cycles through the states click by click, you'll find something that does the job.
 
Last edited:
Upvote 0

emexes

Expert
Licensed User
or as a first-draft homebrew, you could roll your own using a regular label, advance it one step through the sequence on each click, eg:
B4X:
Sub Label1_MouseClicked (EventData As MouseEvent)

    Dim Sequence As String = "☐☑☒☐"    'Unicode characters, but you could probably use FontAwesome instead.

    Label1.Text = Sequence.CharAt(Sequence.IndexOf(Label1.Text) + 1)

End Sub
In fact, you could change the color too 🤔 or even use Unicode emojis eg: 😶🙂🙁

1594297862296.png
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
I didn't even think of the Fontawesome images. Thank you
 
Upvote 0
Top