thanks for your reply. but I used self.window.window.set_decorations(decor),report this error: AttributeError: 'NoneType' object has no attribute 'set_decorations' I used glade,and my window is a Dialog.how to correct use the set_decorations function?thanks
-- 知其然,不知其所以然! 在2009-10-12,"Tim Evans" <[email protected]> 写道: >Marco Antonio Islas Cruz wrote: >> set the window property 'resizable' to false. >> >> On Mon, 2009-10-12 at 11:28 +0800, holmes86 wrote: >>> Hi,everyone >>> I set window size 800x600,and I don't need window to maximum.So I want >>> to cutting off the maximum button in the window.How can do it? >>> thanks very much > >Alternatively, set the "decorations" of the underlying GdkWindow. The >full list of decorations is: 'border', 'resizeh', 'title', 'menu', >'minimize', 'maximize'. It depends on your OS (and for Linux your >window manager) which of these can be switched off. Code would look >something like this: > > decor = 'border', 'resizeh', 'title', 'menu', 'maximize' # no maximize > window.window.set_decorations(decor) > >Note that you need to wait for the GtkWindow to be realized before you >can access its GdkWindow. Handling the 'realize' signal is the normal >way to do that, so code often ends up looking like this: > > def on_realize_set_decor(window, decor): > window.window.set_decorations(decor) > > decor = 'border', 'resizeh', 'title', 'menu', 'maximize' # no maximize > window.connect('realize', on_realize_set_decor, decor) > >-- >Tim Evans >Applied Research Associates NZ >http://www.aranz.com/ >_______________________________________________ >pygtk mailing list [email protected] >http://www.daa.com.au/mailman/listinfo/pygtk >Read the PyGTK FAQ: http://faq.pygtk.org/
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
