Skip to content

Instantly share code, notes, and snippets.

@gfhuertac
Last active December 4, 2018 14:50
Show Gist options
  • Save gfhuertac/d0a1f698e627a6b0c0e023f87740b8ad to your computer and use it in GitHub Desktop.
Save gfhuertac/d0a1f698e627a6b0c0e023f87740b8ad to your computer and use it in GitHub Desktop.
UI demo
from tkinter import Tk, Label, Button, StringVar
class AlprGui:
def __init__(self, master):
self.master = master
master.title("Última placa patente reconocida")
self.label_index = 0
self.label_text = StringVar()
self.label_text.set("")
self.label = Label(master, textvariable=self.label_text)
self.label.pack()
self.close_button = Button(master, text="Close", command=master.quit)
self.close_button.pack()
def change_label(self, text):
self.label_text.set(text)
#si no anda lo anterior, entonces usar
#self.label['text'] = text
root = Tk()
alpr_gui = AlprGui(root)
root.mainloop()
alpr_gui.change_label("HH-II-11")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment