473,433 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,433 software developers and data experts.

customize Tkinter window button~

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~
---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
Jul 18 '05 #1
2 2804
black <qu********@yahoo.com> wrote in
news:ma*************************************@pytho n.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.
Jul 18 '05 #2
In article <Xn**********************************@64.164.98.51 >,
Howard Lightstone <ho****@eegsoftware.com> wrote:
black <qu********@yahoo.com> wrote in
news:ma*************************************@pyth on.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 <cl****@phaseit.net>
Business: http://www.Phaseit.net
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob | last post by:
My first GUI so be gentle... When I start my program I call a class that runs the initial window. While in this class if a certain button is pressed it calls a function outside the class. This...
3
by: DoubleM | last post by:
Hi, I'm running Python2.3.3c1 on Mandrake 9.1 The following code is designed to bring up a window with a button labeled "popup". Clicking on the popup buttons triggers a secondary window with...
1
by: Pekka Niiranen | last post by:
Hi there, after reading TkInter/thread -recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/82965 I wondered if it was possible to avoid using threads for the following problem: ...
6
by: max(01)* | last post by:
hi people. when i create a widget, such as a toplevel window, and then i destroy it, how can i test that it has been destroyed? the problem is that even after it has been destroyed, the instance...
0
by: syed_saqib_ali | last post by:
Below is a simple code snippet showing a Tkinter Window bearing a canvas and 2 connected scrollbars (Vertical & Horizontal). Works fine. When you shrink/resize the window the scrollbars adjust...
0
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo...
1
by: Michael Yanowitz | last post by:
Hello: Below I have included a stripped down version of the GUI I am working on. It contains 2 dialog boxes - one main and one settings. It has the following problems, probably all related, that...
1
by: yvesd | last post by:
hello i want to intercept tkinter python system events like wm_delete_window and if possible for any window, but the newest code I've produced give me an error : Traceback (most recent call...
3
by: J-Burns | last post by:
Hello. Im a bit new to using Tkinter and im not a real pro in programming itself... :P. Need some help here. Problem 1: How do I make something appear on 2 separate windows using Tkinter? By...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.