user-interface

Python Tkinter Button Not Showing Up

Python Tkinter Button Not Showing Up Question: I used Tkinter Designer by Parth Jadhav to generate the UI of it, I have gotten no error but the button still doesnt show up The Code: from tkinter import * import new_post from pathlib import Path from tkinter import Tk, Canvas, Entry, Text, Button, PhotoImage def home_page_screen(): …

Total answers: 1

Switching values of tk.call() and ttk.Style().theme_use()

Switching values of tk.call() and ttk.Style().theme_use() Question: I have the following function that supposed to switch the theme of my GUI, but I’m dealing with a small issue. The theme switches the first time CheckButton pressed. But trying it again getting the following errors: _tkinter.TclError: Theme forest-light already exists and: _tkinter.TclError: Theme forest-dark already exists …

Total answers: 1

Using Tkinter's askopenfilename() with matplotlib not working in GUI

Using Tkinter's askopenfilename() with matplotlib not working in GUI Question: I am creating a GUI for my program and I would like the first step be that the user selects an image, which is then displayed on the GUI. The program works if I put a file path directly into it, but when I use …

Total answers: 1

How to change some settings on LabeledProgressbar in tkinter?

How to change some settings on LabeledProgressbar in tkinter? Question: The source code is .. from tkinter import * import time from tkinter.ttk import Progressbar, Style def prog(): for i in range(0, 11): time.sleep(0.1) p1.step(100 / 10) txt = str(i) + ‘/’ + str(10) s1.configure("LabeledProgressbar", text=txt) fn.update() for i in range(0, 16): time.sleep(0.1) p2.step(100 / …

Total answers: 1

Add dropdown actions to Pyqt5 frame widget when right-click event is triggered

Add dropdown actions to Pyqt5 frame widget when right-click event is triggered Question: I have a Qframe widget and I already created an event triger like this def mousePressEvent(self, QMouseEvent): if QMouseEvent.button() == Qt.RightButton: # do what you want here print("Right Button Clicked") #showMenuAtMouseLocation() # to be implemented I want a small menu list to …

Total answers: 1

How to create a 3 tab window on tkinter

How to create a 3 tab window on tkinter Question: As i state in the title, i’m trying to create a 3 tab window by using tkinter on pythen. I tried to expand an example of a two tabs window that i’ve found, but i got no luck. What i’ve tried to to so far …

Total answers: 1

Taipy Callbacks could not match the selection with the wanted chart to appear

Taipy Callbacks could not match the selection with the wanted chart to appear Question: I want to create a list of selections such as ["Global suicides by year", "Global suicides by genders"] as the picture shows below. As I want to click on the selection, the corresponding chart will then appear. For example, if I …

Total answers: 1

Add an oval shape into a PDF surrounding the highlighted text

Add an oval shape into a PDF surrounding the highlighted text Question: import fitz def highlight_text(pdf_file, room_id): for page in pdf_file: ### SEARCH text = str(room_id) print(text) text_instances = page.search_for(text) ### HIGHLIGHT for inst in text_instances: highlight = page.add_highlight_annot(inst) highlight.set_colors({"stroke":(0, 1, 0), "thickness": 2}) # <– change thickness here highlight.update() print(highlight) # create a shape …

Total answers: 2