i want to create a blank table ,here is my program:
require ‘gtk2’
window = Gtk::Window.new(“Table”)
window.signal_connect(“delete_event”) do
Gtk.main_quit
false
end
window.border_width = 200
table = Gtk::Table.new(10, 10, false)
window.add(table)
window.show_all
Gtk.main
when i run ,i can see a window ,not table in it,why?
Le mercredi 09 juin 2010 à 04:17 +0200, Pen T. a écrit :
when i run ,i can see a window ,not table in it,why?
What do you expect ?
A Gtk Table is a layout object, it is not visible by itself.
You have to add objects into the table, and they will be aligned in rows
and columns
please see my attachment,how to create the cell-like graph?which kind of
widget to be added ?
Tables are made in GTK with the Tree View Widget.
Tree view widgets are very powerful but also complicated. Explaining
in an email how to do it would take too long. But there is a tutorial
on it:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev
MikeC