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
3
votes
2 answers

CTRL + a select all in entry widget tkinter python

How I can select all text like block using click+drug left mouse in Entry widget tkinter python. e1 = tk.Entry(bop, width = 50, font = "Helvetica 13") e1.grid(row=1,column=1, padx=15, pady=15) e1.bind_class("Entry","",…
halim hamadi
  • 99
  • 3
  • 12
3
votes
4 answers

How do I get an entry widget to save what I input? Python Tkinter

I want to make an entry widget that inputs personal details, however I want to save those details as variables, so I can write them in a txt file. from tkinter import * root = Tk() Label(root, text = "Childs First name").grid(row = 0, sticky =…
user6842389
  • 49
  • 1
  • 4
  • 8
3
votes
1 answer

Python Tkinter entry widget won´t accept input

I have run into a very weird Problem with Tkinter entry widgets. When I try to enter something into them they don´t accept my input. After some PC restarting and Python reinstalling I figured out why this happens: I had a messagebox just before the…
3
votes
1 answer

How to make permanent Entry Changes to a label or button

Ive made a sample program on how generally it looks like.. my goal is to have the Data Entry write permanently to the button so dat if I run the program again its update the current price. from tkinter import* import tkinter as tk import…
3
votes
1 answer

Why does calling entry.get() give me "invalid command name"?

This is my code: def ask(what,why): root=Tk() root.title(why) label=Label(root,text=what) label.pack() entry=Entry(root) entry.pack() button=Button(root,text='OK',command=root.destroy) button.pack() …
Onken Guy
  • 101
  • 1
  • 2
3
votes
2 answers

Problems displaying input data into a textbox using tkinter,python

I am trying to create a program where you input data directly into the tkinter interface and then displaying the data in a textbox. However, I am getting the following error line 2122, in __init__ (widgetName, self._w) + extra +…
naynt
  • 53
  • 2
  • 4
3
votes
1 answer

How to set to see end of text in Tkinter Entry widget?

I am making a gui interface to make my script available to general user. My question is - I have a entry widget which takes 'file path' as value when user picks a file using browse button. Problem is entry widget shows the beginning (left end) of…
Manavalan Gajapathy
  • 3,900
  • 2
  • 20
  • 43
3
votes
1 answer

Validation function prints previous input and not the current one

This is my code: root = Tk() def mytest(): var = entry.get() print(var) return True entry = Entry(root, validate="key", validatecommand=mytest) entry.pack() root.mainloop() I was trying to validate each letter that user enters. The…
Chris Aung
  • 9,152
  • 33
  • 82
  • 127
3
votes
1 answer

Using Entry box with Tkinter in Grid manager?

I'm trying to make a basic GUI using Tkinter and have an entry box next to my label using a Grid manager, but the window is not showing when I run my program if I use .grid() with my Entry object. It does work when I use .pack(), which is strange…
Donuts
  • 31
  • 2
3
votes
1 answer

Entry field with submit button in python?

I would like to make a password and username entry field. And a "submit" button on the bottom. This is what i have got so far but i cant figure out how to work with the grid: So this is the code that will create 1 entry field, names "username" from…
EatMyApples
  • 465
  • 6
  • 11
  • 18
2
votes
2 answers

How can I reuse logic to handle a keypress and a button click in Python's tkinter GUI?

I have this code: from tkinter import * import tkinter as tk class App(tk.Frame): def __init__(self, master): def print_test(self): print('test') def button_click(): print_test() …
questionto42
  • 7,175
  • 4
  • 57
  • 90
2
votes
2 answers

How to ensure that python tkinter entry accept only digit and underscore?

I am trying create small tkinter python program. It should accept only digit and underscore. Example: 78_90_01 == Accept 89a_90_b == Through error a90_ == Through error _90a == Through error _a == Through error _a9 == Through error 89-0a ==…
thangaraj1980
  • 141
  • 2
  • 11
2
votes
1 answer

ttk Entry widget font being overwritten by theme

Does anyone know why the ttk.Entry widget font is being overwritten when creating the widget outside of a function called by a Button but it retains the font correctly if you create the widget using a ttk.Button? import tkinter as tk from tkinter…
Michael
  • 23
  • 2
2
votes
1 answer

problems with entry box using ttk in pyhton

I'm making a program but I can't write things inside the entry box of ttk. The windows digital keyboard doesn't pop out and either so I can't copy/paste things inside it. can someone help fixing this? # Definindo Valores iniciais i_nome =…
Sir Eiras
  • 21
  • 1
2
votes
2 answers

tkinter .after() second and minute

hey guys i have a problem im making a timer in tkinter but i cant use time.sleep() so i use .after() and i have new problem,I made an entry that I want the entry number to be * 60 and after the set time, a text will be written that says >> time is…
user20310213