The Midnight Coder
July 23rd, 2010, 05:33 PM
Hi.
I just started with pygtk and I cant seem to get the button to a certain height and width. I tried set_size_request but it doesn't seem to work. Can anybody help me with this?
This is my __init__ function:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("MyApp1")
self.window.set_size_request(400,400)
self.window.connect("delete_event",self.delete_event)
self.box1 = gtk.HBox()
self.quit_button = gtk.Button("Quit",gtk.STOCK_CLOSE)
self.quit_button.set_size_request(20,20)
self.quit_button.set_tooltip_text("Close this window")
self.quit_button.connect("clicked",self.manual_quit)
self.box1.pack_start(self.quit_button)
self.window.add(self.box1)
self.box1.show()
self.quit_button.show()
self.window.show()
I just started with pygtk and I cant seem to get the button to a certain height and width. I tried set_size_request but it doesn't seem to work. Can anybody help me with this?
This is my __init__ function:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("MyApp1")
self.window.set_size_request(400,400)
self.window.connect("delete_event",self.delete_event)
self.box1 = gtk.HBox()
self.quit_button = gtk.Button("Quit",gtk.STOCK_CLOSE)
self.quit_button.set_size_request(20,20)
self.quit_button.set_tooltip_text("Close this window")
self.quit_button.connect("clicked",self.manual_quit)
self.box1.pack_start(self.quit_button)
self.window.add(self.box1)
self.box1.show()
self.quit_button.show()
self.window.show()