I am using GTK and I have inserted a CheckButton
(GTK version of checkbox) to a window. Now I need to get if it's checked or not. How do I do that?
Despite I fail to see advantage of QA site which answers with: google is your friend, I will answer this question for people who are (googling) looking for the same...
The property Active
of Gtk.CheckButton
is alternative of Checked
in checkbox
so
if (checkbox.Active)
{
// the checkbox was checked
} else
{
// it wasn't checked
}
First answer on google for the items gtk checkbox sharp
(at least for me) yields http://www.mono-project.com/GtkSharp:_Buttons, goto the section Toggle buttons
& Check buttons
.
It's the Active
member you need to check
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With