Button
Button performs an action when the user clicks it.
Appearance
Runnable example
require "uing"
UIng.init
window = UIng::Window.new("Button Examples", 300, 100, margined: true)
window.on_closing do
UIng.quit
true
end
button = UIng::Button.new("Button") do
on_clicked do
window.msg_box("Information", "You clicked the button")
end
end
button.tooltip = "Click to show a message"
window.child = button
window.show
UIng.main
UIng.uninit
Usage notes
- Handle clicks with
on_clicked. - The inherited
tooltip,enable, anddisableoperations are available.


