do you means this:

# Create a new window
        self.Window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.Button=gtk.Button("Hello")
        self.Window.add(self.Button)
        self.Button.set_border_width(0)
        #self.Button.set_size_request(100,400)
        self.Window.set_default_size(200,600)
        self.Expander=gtk.Expander()
        self.Expander.set_size_request(100,400)
        self.Expander.add(self.Button)
        self.Expander.set_expanded(False)
        self.Button.show()
        self.Expander.show()
        self.Window.show()
or
# Create a new window
        self.Window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.Button=gtk.Button("Hello")
        self.Window.add(self.Button)
        self.Button.set_border_width(0)
        self.Button.set_size_request(100,400)
        self.Window.set_default_size(200,600)
        self.Expander=gtk.Expander()
        #self.Expander.set_size_request(100,400)
        self.Expander.add(self.Button)
        self.Expander.set_expanded(False)
        self.Button.show()
        self.Expander.show()
        self.Window.show()

when I test all of these,the button always fill the window



2009/12/9 John Stowers <[email protected]>

> >
> >
> >     the default window's width is 200,and height is 600,but the button
> > fill the window,do I make something wrong?
>
> You said it yourself, it sets the minimum size. The widget can grow, and
> it does when it is packed into the window.
>
> If you do not want the widget to expand into all available space, then
> pack it into a container with the appropriate values for fill and expand
> set (False)
>
> John
>
>
>
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to