def initialize(self): global naamInvoer global achternaamInvoer global telefoonnummerInvoer global pincodeInvoer naam = tk.Label(self, text="Naam: ").pack() naamInvoer = tk.Entry(self) naamInvoer.pack() #print(naamInvoer.get()) achternaam = tk.Label(self, text="Achternaam: ").pack() achternaamInvoer = tk.Entry(self) achternaamInvoer.pack() telefoonnummer = tk.Label(self, text="Telefoonnummer: ").pack() telefoonnummerInvoer = tk.Entry(self) telefoonnummerInvoer.pack() pincode = tk.Label(self, text="Kies een viercijferige pincode: ").pack() pincodeInvoer = tk.Entry(self) pincodeInvoer.pack() doorgaan = tk.Button(self, text="doorgaan", command=self.importDatabase).pack()
def initialize(self): label_1 = tk.Label(self, text="wat is uw fietsnummer: ") label_2 = tk.Label(self, text="wat uw pincode: ") entry_1 = tk.Entry(self) entry_2 = tk.Entry(self, show="*") label_1.grid(row=0, sticky=tk.E) label_2.grid(row=1, sticky=tk.E) entry_1.grid(row=0, column=1) entry_2.grid(row=1, column=1)
def show(self, title='image', temp='_temp_.ppm'): """Displays self in a pop-up window using Tkinter, and waits till the user either clicks on or closes the window. Saves the image as a temporary ppm file (specified by temp).""" if _tkinter._default_root: root = _tkinter.Toplevel() else: root = _tkinter.Tk() self.save_ppm(temp) image = _tkinter.PhotoImage(master=root, file=temp) root.title('%dx%d image' % (self.width, self.height)) label = _tkinter.Label(root, image=image) label.pack() label.bind('<Button>', lambda e: root.destroy()) root.mainloop() os.remove(temp)
def initialize(self): tk.Label(self, text='randomtext').pack()
canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH) canvas.pack() #background_image = tk.PhotoImage(file='landscape.png') #background_label = tk.Label(root, image=background_image) #background_label.place(relwidth=1, relheight=1) frame = tk.Frame(root, bg='#80c1ff', bd=5) frame.place(relx=0.5, rely=0.1, relwidth=0.75, relheight=0.1, anchor='n') entry = tk.Entry(frame, font=40) entry.place(relwidth=0.65, relheight=1) button = tk.Button(frame, text="Get Weather", font=40, command=lambda: get_weather(entry.get())) button.place(relx=0.7, relheight=1, relwidth=0.3) lower_frame = tk.Frame(root, bg='#80c1ff', bd=10) lower_frame.place(relx=0.5, rely=0.25, relwidth=0.75, relheight=0.6, anchor='n') label = tk.Label(lower_frame) label.place(relwidth=1, relheight=1) root.mainloop()