tkinter

Clock does not run

Clock does not run Question: I would like to programm a simple clock with python and tkinter indicating local and utc time in the same window. As you can see on the screenshoot, first clock local time is not running, but the second clock below utc time is running well. At the moment I can …

Total answers: 1

svg2rlg converting svg to png only part of the image with percentage size

svg2rlg converting svg to png only part of the image with percentage size Question: My svg image: https://pastebin.com/raw/EeptY1C8 My code: from svglib.svglib import svg2rlg from reportlab.graphics import renderPM drawing = svg2rlg("qr_code.svg") renderPM.drawToFile(drawing, "temp.png", fmt="PNG") from tkinter import * tk = Tk() from PIL import Image, ImageTk img = Image.open(‘temp.png’) pimg = ImageTk.PhotoImage(img) size = img.size …

Total answers: 1

How to center an image in the tkinter Text widget?

How to center an image in the tkinter Text widget? Question: A button on the main application opens a help file that is a text file imported from the file system. Before the text I want to display an image. This code places the image properly before the text BUT I can’t center it. Here’s …

Total answers: 1

Tkinter not recognizing any type of function

Tkinter not recognizing any type of function Question: import tkinter import customtkinter tk = tkinter.Tk(className=’Tkinter – TutorialKart’, ) tk.geometry("500×300") def submitFunction() : q1 = tk.Label(text="Hello, Tkinter") q1.pack button_submit = tkinter.Button(tk, text ="Submit", command=submitFunction) button_submit.config(width=20, height=2) button_submit.pack() tk.mainloop() As you can see by running the code and editing the variable q1 to any other function it …

Total answers: 2

How do I write Python code that enters a file and outputs its 'type-size' properties?

How do I write Python code that enters a file and outputs its 'type-size' properties? Question: How do I write Python code that enters a file’pdf,word, png…’ and outputs its ‘type-size’ properties ? How do I write Python code that enters a file and outputs its ‘type-size’ properties Asked By: MANEL AMROUCHE || Source Answers: …

Total answers: 1

How to set a tkinter textbox to be in the button right of the window

How to set a tkinter textbox to be in the button right of the window Question: I am working on a simple UI for my electronics project application, I am using tkinter as my window and want to add a text box that will be used as a logger. My screen size is the window’s …

Total answers: 1

Tkinter button size is not accurate

Tkinter button size is not accurate Question: I want to set the size of a button in Tkinter, but it won’t be as big as I want. It should be 100 pixels high and 100 pixels wide, but the button almost takes up the 800×600 window. enter image description here I am using this code …

Total answers: 1