customize Tkinter window button~

Cameron Laird claird at lairds.com
Thu Dec 4 07:44:06 EST 2003


In article <Xns9446DF6407689howardeegsoftwarecom at 64.164.98.51>,
Howard Lightstone  <howard at eegsoftware.com> wrote:
>black <quiteblack at yahoo.com> wrote in
>news:mailman.89.1070511965.16879.python-list at python.org: 
>
>>  i am with Win2k and had built a window with Tkinter, it has 3 button
>>  on its topright corner as common window, but what i want is just one
>>  or tow of them. ie, is there any way i can configure the appearance
>>  of minimize, maximize and close button ? 
>
>Basically, no.  Those buttons are a function of the Windows standard window 
>creation logic.  It is possible to add to or change those buttons (using 
>ctypes) - but you are looking at some pretty hairy and poorly documented 
>routines (such as the required callbacks for each button).
>
>What you CAN do is use the overrideredirect method to turn off the entire 
>top bar and instead put one of your own (Tkinter) buttons there.  Just 
>don't forget to handle the (closing, moving the window, etc.,) events for 
>the window.

All true.  Yet another possibility:  leave the buttons
in place, but bind alternate actions to them.
-- 

Cameron Laird <claird at phaseit.net>
Business:  http://www.Phaseit.net




More information about the Python-list mailing list