tagged [tkinter]

How to select a directory and store the location using tkinter in Python

How to select a directory and store the location using tkinter in Python I am creating a GUI with a browse button which I only want to return the path. I've been looking at solutions using code like b...

How can I prevent a window from being resized with tkinter?

How can I prevent a window from being resized with tkinter? I have a program which creates a window where a message is displayed according to a check box. How can I make the window size constant when ...

15 Feb at 16:52

Using Tkinter in python to edit the title bar

Using Tkinter in python to edit the title bar I am trying to add a custom title to a window but I am having troubles with it. I know my code isn't right but when I run it, it creates 2 windows instead...

17 Dec at 14:22

How to set the min and max height or width of a Frame?

How to set the min and max height or width of a Frame? The size of Tkinter windows can be controlled via the following methods: Are there equivalent ways to control the size of Tkinter or ttk Frames? ...

9 May at 12:36

How can I create a simple message box in Python?

How can I create a simple message box in Python? I'm looking for the same effect as `alert()` in JavaScript. I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically subm...

3 Jun at 04:7

Changing the text on a label

Changing the text on a label I am having trouble with using a key binding to change the value of a label or any parameter. This is my code: ``` from tkinter import* class MyGUI: def __init__(self): ...

5 Jul at 07:31

tkinter: how to use after method

tkinter: how to use after method Hey I am new to python and am using tkinter for my gui. I am having trouble using the "after" method. The goal is to make a random letter appear every 5 seconds. Here ...

Cannot use geometry manager pack inside

Cannot use geometry manager pack inside So I'm making an rss reader using the tkinter library, and in one of my methods I create a text widget. It displays fine until I try to add scrollbars to it. He...

17 Sep at 19:10

PermissionError: [Errno 13] Permission denied

PermissionError: [Errno 13] Permission denied I'm getting this error : ``` Exception in Tkinter callback Traceback (most recent call last): File "C:\Python34\lib\tkinter\__init__.py", line 1538, in __...

Tkinter example code for multiple windows, why won't buttons load correctly?

Tkinter example code for multiple windows, why won't buttons load correctly? I am writing a program which should: 1. Open a window with the press of a button. 2. Close the newly opened window with the...

15 Feb at 18:40

How to set a tkinter window to a constant size

How to set a tkinter window to a constant size I'm programming a little game with tkinter and briefly, I'm stuck. I have a kind od starting menu, in which are two buttons and one label. If I just crea...

12 Apr at 14:14

Best way to structure a tkinter application?

Best way to structure a tkinter application? The following is the overall structure of my typical python tkinter program. ``` def funA(): def funA1(): def funA12(): # stuff def funA2(): ...

27 Dec at 01:13

Tkinter understanding mainloop

Tkinter understanding mainloop Till now, I used to end my Tkinter programs with: `tk.mainloop()`, or nothing would show up! See example: ``` from Tkinter import * import random import time tk = Tk() t...

27 Dec at 10:46

Is there a GUI design app for the Tkinter / grid geometry?

Is there a GUI design app for the Tkinter / grid geometry? Does anyone know of a GUI design app that lets you choose/drag/drop the widgets, and then turn that layout into Python code with the appropri...

7 Jul at 16:22

How do I bind the enter key to a function in tkinter?

How do I bind the enter key to a function in tkinter? I am a Python beginning self-learner, running on MacOS. I'm making a program with a text parser GUI in tkinter, where you type a command in a `Ent...

How to clear/delete the contents of a Tkinter Text widget?

How to clear/delete the contents of a Tkinter Text widget? I am writing a Python program in `TKinter` on Ubuntu to import and print the name of files from particular folder in `Text` widget. It is jus...

11 Nov at 16:0

filedialog, tkinter and opening files

filedialog, tkinter and opening files I'm working for the first time on coding a Browse button for a program in Python3. I've been searching the internet and this site, and even python standard librar...

Tkinter scrollbar for frame

Tkinter scrollbar for frame 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 e...

2 Mar at 17:52

How do I change the background of a Frame in Tkinter?

How do I change the background of a Frame in Tkinter? I have been creating an program using Tkinter, in Python 3.3. On various sites I have been seeing that the Frame widget can get a different backgr...