customize Tkinter window button~

B

black

Howdy~

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 ?
Regards~
 
H

Howard Lightstone

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.
 
C

Cameron Laird

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top