Forum: Ruby-Gnome 2 why not table display?

Posted by Pen Ttt (luofeiyu)
on 2010-06-09 04:17
Attachment: table.png (45,5 KB)
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?
Posted by Pascal Terjan (Guest)
on 2010-06-09 09:06
(Received via mailing list)
Le mercredi 09 juin 2010 à 04:17 +0200, Pen Ttt 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
Posted by Pen Ttt (luofeiyu)
on 2010-06-09 11:57
Attachment: gtktable-cells.jpg (51,3 KB)
please see my attachment,how to create the cell-like graph?which kind of 
widget  to be added ?
Posted by Mike Charlton (Guest)
on 2010-06-09 12:30
(Received via mailing list)
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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.