Questions tagged [tkinter-entry]

Tkinter Entry refers to a type of widget used in Tkinter (a Python standard GUI package), called the Entry widget, used to enter or display a single line of text. Not to be confused with the Text widget which is used to enter multiple lines of text. Use this tag for questions related to the Entry widget.

Tkinter Entry refers to a type of widget used in Tkinter (a Python standard GUI package), called the Entry widget, used to enter or display a single line of text. Not to be confused with the Text widget which is used to enter multiple lines of text. Use this tag for questions related to the Entry widget.

1335 questions
7
votes
2 answers

Tkinter entry widget float

I have been writing a tkinter application that takes floats from multiple entry widgets and then uses the floats in a calculation to produce a float that can then be displayed in an appropriate label. When I run the application I get 'ValueError:…
user3925339
6
votes
1 answer

Matplotlib rcParams ignored when plotting

I am working on an interactive plotting script using matplotlib version 3.2.2 and tkinter. When the script is run, the first window looks like this: Furthermore, the rcParams are updated and plotted once the Plot figure button is clicked: If I now…
meerkat
  • 932
  • 2
  • 14
  • 38
6
votes
2 answers

Pack labels right next to entry box in tkinter python

I have a window that prompts users to enter the directory of their log files. However, my label seems to pack on top of my entrybox. Any idea on how to pack them side by side? labelText=StringVar() labelText.set("Enter directory of log…
user2633882
  • 1,551
  • 3
  • 11
  • 6
6
votes
2 answers

Python Tkinter: Delete the Last Character of a String

I am making an entry that only allows numbers to be entered. I am currently stuck on deleting the character just entered if it that character is not a integer. If someone will replace the the "BLANK" with what needs to go in there it would be a lot…
Brandon Nadeau
  • 3,568
  • 13
  • 42
  • 65
5
votes
1 answer

Changing entry box background colour in tkinter

So I've been working on this program and I'm finding it very hard to figure out what's wrong. I'm fairly new to tkinter so this may be quite minor. I'm trying to get the program to change the entry box's background colour when the check button is…
Bhavik Narang
  • 109
  • 1
  • 2
  • 10
5
votes
4 answers

Undo and Redo in an Tkinter Entry widget?

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 when configuring a Text widget to act as an Entry…
Malcolm
  • 5,125
  • 10
  • 52
  • 75
5
votes
1 answer

Make Tkinter Entry widget readonly but selectable

Is there any way to make the Tkinter Entry widget so that text can be highlighted and copied, but not changed?
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
5
votes
1 answer

How can I get the tkinter entry from a loop

I wants to make a program with multiple tkinter Entry widgets. I use a for loop to make multiple Entry widgets. But how can I get the value from it? My test code: from tkinter import * root=Tk() variables = [] entries = [] for i in range(10): …
Luuk Verhagen
  • 350
  • 1
  • 5
  • 13
5
votes
3 answers

Tkinter Entry widget in Python is uneditable

When I run this code, the file picker comes up, and then when I finish with it, I can't type in the entry widget until I focus on another window and then come back. Why is this happening? import tkinter as tk from tkinter.filedialog import…
ddsnowboard
  • 922
  • 5
  • 13
5
votes
1 answer

Variable Number of Entry Fields in Tkinter

I'm trying to create a widget that contains an amount of entry fields based on the an aspect of a file that's loaded in. I've been using self.e = Entry(self.master); self.e.pack(); self.e.delete(0,END); self.e.insert(0, 0); to create each entry but…
Arger
  • 171
  • 1
  • 9
4
votes
2 answers

Python tkinter get() from another function

def CreateGUI(): WinCreate=Toplevel(master) WinCreate.attributes("-toolwindow",1) WinCreate.resizable(0,0) WinCreate.transient(master) WinCreate.grab_set() sideframe=Frame(WinCreate,bd=2,relief=GROOVE) …
user1164977
4
votes
1 answer

Keep selection on Tkinter Entry widget despite not having focus

When a user selects a portion of text in a Tkinter Entry widget it becomes highlighted. However, when the user clicks away from the widget the highlighting disappears. Is there any way to keep the selected text highlighted despite the Entry widget…
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
4
votes
4 answers

tkinter askstring deleted before its visibility changed

I am trying to make a popup window where someone can fill in a string in an Entry box. I have gone through many examples, but it doesn't work. I am trying to this: var_entry = simpledialog.askstring("Test", "Test") I get this error…
Max Koning
  • 172
  • 2
  • 19
4
votes
3 answers

How do I paste the copied text from keyboard in python

If I execute this code, it works fine. But if I copy something using the keyboard (Ctrl+C), then how can I paste the text present on clipboard in any entry box or text box in python? import pyperclip pyperclip.copy('The text to be copied to the…
divyjot singh
  • 51
  • 1
  • 1
  • 5
4
votes
2 answers

Python 3: Tkinter: How to change Entry.get() into an integer

I am coding a simple program which converts imperial units into metric units. However, when I use an Entry.get() command, I need to convert it to an integer and when I try to do that I get this error: Traceback (most recent call last): File…
Bill R
  • 49
  • 1
  • 4
1
2
3
88 89