Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In Glade I made a grid 3x3 ad name it grid, I got instance of grid with

self.grid = self.builder.get_object("grid")

and then I want to add for example a button on that grid when some other button named toolbuttonadd is clicked

def on_toolbuttonadd_clicked(self, widget, data=None):
    button = Gtk.Button()
    self.grid.add(button)

and the problem is that button is not showing what evere I do. I even try with adding button to a box, with same result.

share|improve this question
    
show_all and queue_draw are what you're looking for –  hbdgaf Jun 28 '12 at 22:28
add comment

1 Answer

For Gtk.Grid, you should be calling it's attach method, not add. Also you need to call show() on your button before it will be visible.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.