tkinter

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

Tkinter: share single Frame accross multiple tabs (or dynamically reparent)

Tkinter: share single Frame accross multiple tabs (or dynamically reparent) Question: I have tkinter.Notebook that contains multiple tabs. I have tkinter.Frame "run box" with set of controls, that I want share across several tabs. Specifically Test info and Test list should have it. Currently I duplicate entire "run box" into each tab that needs it. …

Total answers: 1