Is there any options available in Python tkinter that can be used to build a modern-day GUI. For instance, we can change the style of a button, etc. In short, I want to change the whole look & feel of the GUI.
Regards.
Related
Here is my problem. I developed a tkinter GUI for my project. However I am stuck with tkinter limitations. I developed python gui to create a virtual view for a red table as below. The window does not have any border or title. It is just put on the a picture background which is outside of the code.
However as you can see it is not lively enough for me. I want it to look like this:
Is there a way to do this in tkinter? I tried transparent backgrounds, however in Ubuntu transparent background with visible object is not possible. Also You cannot make different window shapes other than rectangle. What is your suggestions? Should I use another library. I really need an expert opinion about this.
Transparent background reference
Different window shape other than rectangle
My environment : Ubuntu 16.04 Python 3.5.2
You can't specifically change the shape of a Tkinter Window, but you can create a canvas and design your own shape (then add your buttons and labels on this canvas if needed).
You can also take a look at PyQt or Kivy, but if you are confortable with Tkinter go with Canvas.
So to solve my issue I found a python library wxPython:
You can check this link it creates Wx non rectangular shape
It creates the the window using inheritence. I tried selected answer and It solved my question.
Btw I tried QTPython, Kivy, tkinter. Non of them had straight example such wxPython.
I want to write something like a taskbar/dock/panel(like tint2,...) with pyQt5.
I know how to write regular GUI applications with it, but my tiling window manager(herbstluftwm) maximizes my panels and openbox makes them resizable etc.
My question : How can I make pyQt show my application as a panel instead of a window? I haven't found anything about that in the documentation.
Thank you.
Thanks to musicamente's help, i could find that the function setWindowFlags() is what I need. It allows to change the behavior of a window.
A website explaining this function is https://pythonprogramminglanguage.com/pyqt5-window-flags/
I assume it should be possible to change the figure setting after plotting (not in the code).
By default, the Interactive Navigation has these buttons as explained in below link: https://matplotlib.org/users/navigation_toolbar.html?highlight=interactive%20navigation
However, it is not possible to change graph settings through any of these buttons (e.g. change axis limitations, or change label name, or change title). These options are available in MATLAB so it definitely should be there in Python3. How can I add these features to Interactive Navigation window?
P.S. My matplotlib version is 3.1.0
"These options are available in MATLAB so it definitely should be there in Python3" There is no indication for that causality being true.
Setting some of the parameters is nonetheless possible when using the Qt backend.
import matplotlib
matplotlib.use("Qt5Agg")
Then a respective button is available
For example like those gadget where is a figure walking around the screen, or any graphics not bounded inside rectangular window, and even is interactive ?
The trick is to do a transparent window and hide the title bar
both are feasible with most graphic library but will be rarely cross platform
I will advise you to look at this question to hide the title bar with tkinter
Tkinter doesn't support transparency so you may need to use wxPython instead
The goal of the program i'm trying to write is a bot that can click and play flash games and press keys inside a window webpage even when I do not have the window selected. My question is very similar to this. What I want to know is how to use win32, selenium, and PIL to take screenshots, analyze the screenshots, and click and press buttons accordingly from the bot. I've looked through the win32api documentation and found little about how to click inside a window in the background.
If someone could give a link to someone who has done this before or just a little nudge in the right direction would be amazing!
pywinauto is even simpler, but it may not recognize Flash controls. The code should just look a bit shorter:
import pywinauto
app = pywinauto.Application().connect(path='process_name.exe')
app.MainDialog.click_input(coords=(953, 656))
To check which controls are visible:
app.MainDialog.print_control_identifiers()
P.S. If you work with Python 3.x, this clone is compatible with Py3.
If your goal is detecting and interacting with images on screen, you might want to take a look at Sikuli. This is exactly what it does. Sikuli automates anything you see on the screen. It uses image recognition to identify and control GUI components. It is especially useful when there is no easy access to a GUI's internal or source code. More info here.