do you means this:<div><br></div><div><br></div><div><div># Create a new window</div><div>        self.Window = gtk.Window(gtk.WINDOW_TOPLEVEL)</div><div>        self.Button=gtk.Button(&quot;Hello&quot;)</div><div>        self.Window.add(self.Button)</div>
<div>        self.Button.set_border_width(0)</div><div>        #self.Button.set_size_request(100,400)</div><div>        self.Window.set_default_size(200,600)</div><div>        self.Expander=gtk.Expander()</div><div>        self.Expander.set_size_request(100,400)</div>
<div>        self.Expander.add(self.Button)</div><div>        self.Expander.set_expanded(False)</div><div>        self.Button.show()</div><div>        self.Expander.show()</div><div>        self.Window.show()</div><div>or</div>
<div><div># Create a new window</div><div>        self.Window = gtk.Window(gtk.WINDOW_TOPLEVEL)</div><div>        self.Button=gtk.Button(&quot;Hello&quot;)</div><div>        self.Window.add(self.Button)</div><div>        self.Button.set_border_width(0)</div>
<div>        self.Button.set_size_request(100,400)</div><div>        self.Window.set_default_size(200,600)</div><div>        self.Expander=gtk.Expander()</div><div>        #self.Expander.set_size_request(100,400)</div><div>
        self.Expander.add(self.Button)</div><div>        self.Expander.set_expanded(False)</div><div>        self.Button.show()</div><div>        self.Expander.show()</div><div>        self.Window.show()</div></div><div><br>
</div><div>when I test all of these,the button always fill the window</div><div><br></div><div>    </div><br><div class="gmail_quote">2009/12/9 John Stowers <span dir="ltr">&lt;<a href="mailto:john.stowers.lists@gmail.com">john.stowers.lists@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">&gt;<br>
&gt;<br>
&gt;     the default window&#39;s width is 200,and height is 600,but the button<br>
&gt; fill the window,do I make something wrong?<br>
<br>
</div>You said it yourself, it sets the minimum size. The widget can grow, and<br>
it does when it is packed into the window.<br>
<br>
If you do not want the widget to expand into all available space, then<br>
pack it into a container with the appropriate values for fill and expand<br>
set (False)<br>
<font color="#888888"><br>
John<br>
<br>
<br>
</font></blockquote></div><br></div>