[Gtk-sharp-list] removing Maximize

Mike Kestner mkestner at gmail.com
Thu Apr 17 17:37:27 EDT 2008

On Thu, 2008-04-17 at 14:57 -0400, Vladimir Giszpenc wrote:

> Is there a way to hide these buttons?

The short answer is probably "no".  Slightly less succinct: not
reliably.   Gtk# is cross-platform, and on X11, the window manager has
much latitude to ignore requests from applications to manage this stuff,
so behavior will vary widely from window manager to window manager.

There are some gdkwindow properties that can be set using the
freedesktop.org window manager spec, but that assumes the window manager
will respect them, which is not guaranteed.

If you are asking about Windows, you may be able to dig into some winapi
pinvokes to make it happen.

Bottom line, I think Gtk mainly tries to blend in to the system it is
running on, so it lets the host windowing environment control the
management of window decorations for the most part.

For what it's worth, I see this as a strength of Gtk, not a weakness.
Opening up all this decoration stuff to every application developer's
whim just makes for inconsistent user interfaces, and in many cases for
very little gain.  Exactly what is the harm of having a Maximize button
on your About dialog?  No sane user is going to click it, and even if an
insane one did, what harm will it do?  ;-)

Perhaps others have some specific hacks they've discovered to accomplish
things like this.  If so, a tutorial on the wiki at
http://mono-project.com would be great, so that I can refer people to
that from now on.  ;-)  

Mike Kestner <mkestner at gmail.com>

More information about the Gtk-sharp-list mailing list