PDA

View Full Version : Ruby Gtk::Table



apoth
June 11th, 2007, 12:16 PM
I've tried creating an application with a Gtk::Table and want to add data to it dynamically.


symbol_label = Gtk::Label.new.set_text('Test1')
price_label = Gtk::Label.new.set_text('Test2')
@glade.get_widget("table1").attach_defaults(symbol_label,0,1,0,1)
@glade.get_widget("table1").attach_defaults(price_label,1,2,0,1)

The above code runs without error, but doesn't visibly add rows to the table. There aren't any rows in the table so I don't know if anything is perhaps just not visible. Perhaps I need to call some sort of repaint method? Anyone know where I might be going wrong?

Thanks

apoth
June 11th, 2007, 04:50 PM
I just had to explicitly .show the labels.