I have a Python program that uses Tkinter to display a scrollable window. Is there any way to connect the two-finger swipe gesture on the touchpad to scrolling in this window?
Related
using tkinter, can somebody please give me some advice about to center all the actions in my actual window?
in other words, I have a window that have to be closed before the system recognize the mouse click in any other part of the display out of the window. Let's see I have three windows in cascade, Window1, Window2 and window3,
in window1 you have a button that opens a smaller window2, and in this window2 you have a similar button to open an even smaller window3; window3 has the same button to close than the others two windows.
if I click this button the windows will destroy itself, obviously but, if I click the mouse out of the window3, the "window3" goes behind window2, and what I want is to destroy window3 or to force every action with the mouse inside window3
I'm not a professional in python/tkinter only someone who is working in a project,
Question: Is it possible to use python to draw a box anywhere on the screen, outside of the application window.
Background:
I have some mouse/keyboard macros I use for work, programmed in python pyautogui, and have to make new ones and adjust them frequently. I would like my program to be such that I can use my mouse to draw a box over any part of my screen over any application window, and record the coordinates of the box for use within my macros. The box would be used as the selector, and would disappear once recorded. Basically the same thing as when you hold down your left mouse button on your desktop to select multiple icons, except I would just need the coordinates of the box to be returned for use in the macros (which I can already do with pyautogui).
Is it possible to draw outside of the canvas window? Perhaps there is a way to hide the canvas window without hiding the contents within it?
I want to read mouse left and right scroll click events and simulate them in Python in windows. I know I can detect and simulate the default ones such as middle mouse button, vertical and horizontal scroll using the virtual-key codes defined here:
https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
However, those do not correspond to the non-standardized so called "Repeat Scroll Left" and "Repeat Scroll Right" buttons on my Razer Basilisk V3 which I can activate by clicking the scroll wheel to the left and right. I have tried the AHK method to detect the key codes here with no luck:
https://superuser.com/a/1154645
How would I detect these click events on windows? Are there virtual-key codes for these buttons? If not how would I detect and simulate these buttons in Python ctypes?
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 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)