im putting a few buttons inside of a gtk::alignment, but i can figure
how to put them in, i know that im supposed to do something like
“add_child(builder, child, type)” but what do i put for the builder??
sorry if i sound , im a real noob
Use Linux!!
John Rivera wrote:
im putting a few buttons inside of a gtk::alignment, but i can figure
how to put them in, i know that im supposed to do something like
“add_child(builder, child, type)” but what do i put for the builder??
I think you are looking for Gtk::Container#add, and not
Gtk::Bin#add_child.
(pseudo code, not tested)
align = Gtk::Alignment.new(0, 0, 1, 1)
b1 = Gtk::Button.new(“Test”)
b2 = Gtk::Button.new(“Test”)
align.add(b1)
align << b2
See http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AContainer#add
Simon
After reading closer the Gtk::Alignment doc, you can only pack one
widget into it.
So, if you are looking to pack many buttons, you should look at the
different boxes : Gtk::VBox, Gtk::HButtonBox, etc.
Or maybe, the Gtk::Table or Gtk::Fixed containers.
Look the containers in the doc :
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Ruby%2FGTK
Simon
im just trying to add one child to Gtk::Alignment