How to change Tasbar icon of Kivy window - python

I used TK before but then i had some Problems with Photoimage. In Tk you could easily switch the Taskbaricon and eg. Set the Window Bar to Dark mode. Now i switched to Kivy and now i cant switch neither of them.

Related

how to make tkinter window not moveable with the mouse

very simple problem, I just try to make tkinter window that you are not able to move with the mouse. the problem is that I don't find a function that can do it, the only thing that I found is making it not resizable and stuff like that, I also found a function that hides the bar and making it not resizable or moveable, but it doesn't help me cause I still want it to have the default window bar, let's just say I have a normal window here:
import tkinter as TK
window = TK.Tk()
window.geometry('1200x800')
window.mainloop()
so just tell me if you know how to make it impossible to move the window with the mouse, how to do that, the code should work fine with fullscreen and other functionality like that by the way.

Minimize the window tkinter in the windows system tray

I made a GUI with Tkinter in python 3. Is it possible to close the window and have the application stays in the Windows System Tray?
Is there any lib or command within Tkinter for this.
The entire solution consists of two parts:
hide/restore tkinter window
create/delete systray object
Tkinter has no functionality to work with the system tray.
(root.iconify() minimizes to the taskbar, not to the tray)
step 1) (more info) can be done by
window = tk.Tk()
window.withdraw() # hide
window.deiconify() # show
step 2) can be done by site-packages, e.g. pystray
(an example, the same example, and more info)
You can use the wm_protocol specifically WM_DELETE_WINDOW protocol. It allows you to register a callback which will be called when the window is destroyed. This is an simple example:
import tkinter as tk
root = tk.Tk()
root.protocol("WM_DELETE_WINDOW", root.iconify)
root.mainloop()
.iconify turns the window into an icon in System Tray.

Add button to Tkinter Window panel before minimise, maximise buttons

I have developed a Tkinter GUI and need to add a button in the GUI window top panel, next to the minimise, maximise and close buttons. The button then calls a function. How can this be done?
Tkinter doesn't have any support to do what you want. You'll have to find some sort of platform-specific library to alter what is shown in the window border.
Your only other option is to turn off the window border provided by your OS with overrideredirect, and then create your own border with whatever controls you want. This requires a lot of work because you also have to write the code for moving and resizing the window, but it's possible.

How can create popup menu(window) as in the picture pyqt4

How can I create such a pop up window as shown in the image below? What libraries are available for the implementation of such a task?
Important things are:
The triangle at the top of the popup menu
Shadows around the window
The alignment of the window under the call button
Python (pyqt4)

How do I get a windows border like this in Tkinter?

Is there any way to get a border like this in Tkinter? Notice how it lacks the buttons on the top right. Also I don't want this program to show in the task bar.
This is in windows 7, btw.
Tk (and thus, Tkinter) has a command for removing all window manager decoration. This command in tkinter is the "wm_overrideredirect" method of toplevel windows. Pass it a parameter of True to remove the window manager decorations. You can then draw whatever borders you want, usually by packing a canvas over the entire window and drawing on the canvas.
However, when I experiment with this on my Mac, the window appears properly but won't take focus. Perhaps this is a bug in Tkinter. I don't see the same problem with identical code in Tcl.
The WS_DLGFRAME window style should give you a window without a titlebar and WS_EX_TOOLWINDOW is normally also used for a window like this so it is not visible in the taskbar (Or with a hidden parent window like control panel dialogs before Vista) You can figure out the exact window styles with a tool like Spy++ (Visual Studio) or WinSpy++

Categories

Resources