Text Button that acts like an on/off button


#1

Sorry for the newbie question (I expect I’ve got loads more :slight_smile: )
But what’s the best way of making a toggle button out of a normal TextButton? I don’t want a piddly little tick box thing I want proper lozenge shaped colour goodness!

What’s the best way?

Thanks!!
Dave.


#2

Simply call Button::setClickingTogglesState (true) on it.
It’s a common feature of all buttons, so works for TextButton as well…
HTH


#3

OOo, thanks, I thought I got a ‘redacted’ warning from that one. My mistake. :smile:
Thanks again!!!