<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!--body{padding:1ex;margin:0px;font-family:sans-serif;font-size:small;}a[href]{color:-moz-hyperlinktext !important;text-decoration:-moz-anchor-decoration;}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em;}blockquote blockquote{border-color:#006312;}blockquote blockquote blockquote{border-color:#540000;}--></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>Looking for advice on how to remove or disable a *resizable* window's maximize button under Windows. I'm using Python 2.7 for Windows.</div>
<div>&nbsp;</div>
<div>Background: I have a resizable window with min and max sizes set via the window's minsize() and maxsize() methods. When a user clicks the maximize button, the window moves to the upper left of the display. This is very confusing to my users so I would like to prevent that behavior.</div>
<div>&nbsp;</div>
<div>My research shows several ways to disable a maximize button - but none of these techniques seem to apply to resizable windows?</div>
<div>&nbsp;</div>
<div>1. Prevent a window from resizing via the resizable( False, False ) method.</div>
<div>&nbsp;</div>
<div>2. Remove all the window's controls (and border) via the overrideredirect( True ) method.</div>
<div>&nbsp;</div>
<div>3. Use the mysterious transient(1) method (this raises an exception under Windows).</div>
<div>&nbsp;</div>
<div>Is there a way I can trap the maximize event (what event to bind to?) and return &quot;break&quot; to prevent the maximize from happening (or better yet, substitute my own behavior instead)?</div>
<div>&nbsp;</div>
<div>Thank you,</div>
<div>Malcolm</div></div></body></html>