tkinter Questions

4

Solved

A friend and I are making a game in pygame. We would like to have a pygame window embedded into a tkinter or WxPython frame, so that we can include text input, buttons, and dropdown menus that are ...
Catechin asked 27/4, 2014 at 3:30

4

Solved

Ctrl-C/SIGTERM/SIGINT seem to be ignored by tkinter. Normally it can be captured again with a callback. This doesn't seem to be working, so I thought I'd run tkinter in another thread since its mai...
Secondclass asked 3/10, 2016 at 21:37

2

Solved

I am trying to convert a .py file to .exe using cx_Freeze 5.1.1., but an ImportError: DLL load failed pops up every time I try to run the file. Based on the suggested solutions here and here, I add...
Tropo asked 9/9, 2018 at 17:0

2

Solved

import tkinter as tk root = tk.Tk() root.state('zoomed') text1 = tk.Text(state=tk.DISABLED) scroll = tk.Scrollbar(root, command=text1.yview) text1.configure(yscrollcommand=scroll.set) text1.grid(r...
Allo asked 28/6, 2020 at 10:17

2

Solved

So I am trying to use Axes objects to control my matlibplot figure. I am not using plt (aka import matlibplot.pyplot as plt) because I am embedding the figure in my tkinter GUI per this. However, I...
Burial asked 5/12, 2011 at 10:46

27

Solved

For some reason, I can't use the Tkinter (or tkinter, on Python 3) module. After running the following command in the python shell: import Tkinter or this, in Python 3: import tkinter I got...
Houselights asked 18/9, 2014 at 6:19

3

Solved

The size of Tkinter windows can be controlled via the following methods: .minsize() .maxsize() .resizable() Are there equivalent ways to control the size of Tkinter or ttk Frames? @Bryan: I cha...
Dicky asked 9/12, 2010 at 14:18

5

Is there any library available in python for the graphical user entry input. I know about tk but I believe it takes some line of codes to do that. I am looking for the shortest solution. a = input...
Tumid asked 20/5, 2018 at 18:35

2

I'm creating a tkinter app & when i added the app icon it shows this error Traceback (most recent call last): File "d:\Workspace\python demo\Workspace.py", line 553, in <module>...
Rita asked 17/1, 2022 at 14:3

11

Solved

I'm trying to put a jpg image to a tkinter canvas. tkinter gives me this error: couldn't recognize data in image file I use the code from the documentation: canv = Canvas(root, width=80, heig...
Legaspi asked 17/11, 2017 at 18:31

1

I am using Python v.3.10.7 and tkinter to open a file dialog, and I believe this to be an issue specific to MacOS (using 13.0 (22A380)), however when I am running the following: from tkinter import...
Anaphora asked 14/11, 2022 at 20:58

8

Solved

I would like to know the default window colour in Tkinter when you simply create a window: root = Tk() If there is one, it is possible to set widgets to the same colour or use a hex colour code?...
Simulant asked 5/7, 2012 at 8:44

2

Solved

I have come to understand overrideredirect helps removing the default window decorations like the toolbar.What are its other uses? I am not very sure and couldn't find much documentation. I am work...
Larock asked 2/7, 2016 at 17:47

8

Solved

My objective is to add a vertical scroll bar to a frame which has several labels in it. The scroll bar should automatically enabled as soon as the labels inside the frame exceed the height of the f...
Bedazzle asked 24/4, 2013 at 9:32

8

Tkinter doesnt contain any tk attribute. import tkinter window = tkinter.Tk() win.mainloop() While running this code it gives me an error saying module 'tkinter' has no attribute 'Tk'
Artel asked 7/8, 2019 at 18:12

4

Solved

Is there a way to add undo and redo capabilities in Tkinter Entry widgets or must I use single line Text widgets for this type of functionality? If the latter, are there any tips I should follow ...
Laquanda asked 10/11, 2010 at 17:3

4

Solved

I'm working on a function in a UI class that is a config window, it displays the logo of the program and has an updating text at the bottom telling you what it's loading, etc. This is what I have s...
Garb asked 26/2, 2015 at 22:43

8

Solved

I am using Python 3.5.0 on Windows 10 and want to replace this:
Excommunicate asked 15/10, 2015 at 0:21

2

Solved

I've searched all over, but have yet to find a simple example showing how to change a minor element of a ttk widget style and applying it dynamically (after widget creation). I have some ttk check...
Jacynth asked 26/4, 2013 at 15:51

4

this is my first time ever making full python app with tkinter and wanting to distribute it. I've been searching the net, but I cant quite figure out how to make a license key for my application, a...
Maniac asked 23/7, 2020 at 17:43

3

Solved

I am trying to set the width of some canvas to the width of master (fullscreen) and the height to 1/5, 3/10 and 1/2 of master. Window is correctly shown, but canvas doesn't appear. I unsuccessfully...
Ingredient asked 13/5, 2020 at 23:56

1

Solved

I am making a timer using tkinter in python. The widget simply has a single button. This button doubles as the element displaying the time remaining. The timer has a thread that simply updates what...
Dongdonga asked 23/1, 2023 at 2:7

10

Solved

How do I add an image in Tkinter? This gave me a syntax error: root = tk.Tk() img = ImageTk.PhotoImage(Image.open(path)) panel = tk.Label(root, image = img) panel.pack(side = "bottom", fill = "bo...
Circlet asked 13/4, 2012 at 0:44

3

Solved

I am trying to make a Python program in which you can move around widgets. This is my code: import tkinter as tk main = tk.Tk() notesFrame = tk.Frame(main, bd = 4, bg = "a6a6a6") notesFr...
Fedora asked 17/5, 2016 at 15:11

3

Solved

I am using Tkinter to create a login screen here. At the moment, the "keep me logged in" button at the bottom is redundant and will remain so. What I want to do is use this code: from tkinter impo...
Hittite asked 26/1, 2015 at 18:51

© 2022 - 2024 — McMap. All rights reserved.