Advertisement
Guest User

gtk.rb

a guest
Jan 12th, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.50 KB | None | 0 0
  1. require 'gtk2'
  2.  
  3. window = Gtk::Window.new
  4. window.signal_connect('destroy') { Gtk.main_quit }
  5.  
  6. main_box = Gtk::HBox.new(false, 2)
  7. left_box = Gtk::VBox.new(false, 2)
  8. right_box = Gtk::VBox.new(false, 2)
  9. button = Gtk::Button.new("test")
  10. button2 = Gtk::Button.new("test2")
  11.  
  12. left_box.pack_start(button, true, true, 0)
  13. right_box.pack_start(button2, true, true, 0)
  14. main_box.pack_start(left_box, true, true, 0)
  15. main_box.pack_start(right_box, true, true, 0)
  16.  
  17. window.add(main_box)
  18. window.show_all
  19. Gtk.main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement