def onStart
puts "MyStateObj activated."
$window.setBackground("img/bgblue.png")
$textbox = GGLib::TextBox.new("textbox1", 242, 100, 12, GGLib::Themes::BlueSteel)
GGLib::Button.new(:button1, "Click Me", 270, 50, Proc.new{ |widget| $textbox.text = "Thank you" }, GGLib::Themes::BlueSteel)
GGLib::Button.new(:button2, "Exit", 270, 200, Proc.new{ |widget| $window.close; exit }, GGLib::Themes::BlueSteel)
GGLib::CheckBox.new(:checkbox1, 300, 300, "Check this!", false, GGLib::Themes::BlueSteel)
GGLib::RadioGroup.new(:radio1, 50, 325, { "One" => 1, "Two" => 2, "Three" => 3}, GGLib::RadioGroup::Layout::Vertical, GGLib::RadioGroup::Spacing::Automatic, GGLib::Themes::BlueSteel)
end