Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davidbegin/e39a01e5090339317f6a261ec19fe7f7 to your computer and use it in GitHub Desktop.
Save davidbegin/e39a01e5090339317f6a261ec19fe7f7 to your computer and use it in GitHub Desktop.
from tkinter import *
window = Tk()
# window.geometry("400x400")
window.title("TEST")
# scroll=Scrollbar(window)
# scroll.pack(side=RIGHT, fill=Y)
# listbox=Listbox(window, yscrollcommand = scroll.set)
# for i in range(100):
# listbox.insert(END, "Username " + str(i))
# listbox.pack(side = LEFT)
# scroll.config(command=listbox.yview)
def scan():
name = StringVar()
username = Entry(window, textvariable=(name))
".!entry"
if username.startswith(".!"):
username = username[2:]
# Whats wrong with removing
username.focus_set()
username.pack()
print(f'{username}')
if __name__ == "__main__":
scan = Button(window, text="SCAN", command=scan)
scan.pack()
window.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment