0

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.

1
  • show_all and queue_draw are what you're looking for Jun 28, 2012 at 22:28

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .