“TKINTER WEJŚCIA TEKST” Kod odpowiedzi

TKINTER WEJŚCIA

import tkinter as tk

root= tk.Tk()

canvas1 = tk.Canvas(root, width = 400, height = 300)
canvas1.pack()

entry1 = tk.Entry (root) 
canvas1.create_window(200, 140, window=entry1)

def getSquareRoot ():  
    x1 = entry1.get()
    
    label1 = tk.Label(root, text= float(x1)**0.5)
    canvas1.create_window(200, 230, window=label1)
    
button1 = tk.Button(text='Get the Square Root', command=getSquareRoot)
canvas1.create_window(200, 180, window=button1)

root.mainloop()
Repulsive Reindeer

uczyń etykietę i wejście tkinter

	            there was 2 "=" here V you only need one
example3 = Entry(root, width=10, font="Calibri 10")
example4 = Label(root, width=10, font="Calibri 10")
Grieving Gannet

odczyt wartość z wpisu Tkinter

#ent is the name of the Entry
s = ent.get()
tjwild0127

Jak uzyskać dane wejściowe z widżetu tekstu Tkinter

def retrieve_input():
    input = self.myText_Box.get("1.0",END)
Poised Platypus

Jak utworzyć pudełko Enter w Tkinter

canvas1 = tk.Canvas(root, width = 400, height = 300)
canvas1.pack()
Friendly Ferret

TKINTER WEJŚCIA TEKST

e = Entry(<Widget>, width=50, borderwidth=5)
e.pack()
Donald Duck

Odpowiedzi podobne do “TKINTER WEJŚCIA TEKST”

Pytania podobne do “TKINTER WEJŚCIA TEKST”

Więcej pokrewnych odpowiedzi na “TKINTER WEJŚCIA TEKST” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu