python - Removing or disabling a resizable Tkinter window maximise button under Windows -


this question has answer here:

looking advice on how remove or disable resizable window's maximize button under windows. i'm using python 2.7 windows.

background: have resizable window min , max sizes set via window's minsize() , maxsize() methods. when user clicks maximize button, window moves upper left of display. confusing users prevent behavior.

my research shows several ways disable maximize button - none of these techniques seem apply resizable windows?

  1. prevent window resizing via resizable( false, false ) method.

  2. remove window's controls (and border) via overrideredirect( true ) method.

  3. use mysterious transient(1) method (this raises exception under windows).

  4. bind window's event , try block maximize (update: tkinter has maximized window time our handler detects maximize event. returning "break" or using geometry(size|position) size , re-position window both ignored)

  5. i've posted question on python win32 api mailing list see if can use windows api call disable window's maximize button via hwnd handle believe(?) tkinter exposes.

is there way can trap maximize event (before tkinter performs it)?

malcolm

one possibility set window tool window comes side effects; window no longer appear in taskbar , have thin title bar. still able resized @ edges.

root.attributes("-toolwindow", 1) 

more root attributes can found in this guidebook.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -