Checkbox
Checkbox represents an independent on/off choice.
Appearance
Runnable example
require "uing"
UIng.init
window = UIng::Window.new("Checkbox Example", 300, 100, margined: true)
window.on_closing do
UIng.quit
true
end
checkbox = UIng::Checkbox.new("Check me")
checkbox.on_toggled do |checked|
window.msg_box("Checkbox", "Checked: #{checked}")
end
window.child = checkbox
window.show
UIng.main
UIng.uninit
Usage notes
- Read the state with
checked?and set it withchecked=. on_toggledreceives the new Boolean state.


