hi,
I am new and dont know what went wrong.
when i run this the simpleprint function runs first and then i get a gui part. there is no error. and i am completely new so cant figure out what is wrong with this one. I have tried few things but cant get it working.
I am new and dont know what went wrong.
Code:
from Tkinter import * import tkMessageBox from pysqlite2 import dbapi2 as sqlite class door: global simpleprint def __init__(self,master): frame = Frame(master) self.lable1 =Label (frame,text ="ID") self.lable1.grid(row =0) self.lable2 = Label (frame,text = "Password") self.lable2.grid(row=1) self.entry1 = Entry(frame) self.entry1.grid(row= 0,column =1) self.entry2 = Entry(frame , show="*") self.entry2.grid(row=1,column=1) self.button1 = Button(frame, text="Ok",command=simpleprint(self.entry1.get(),self.entry2.get())) self.button1.grid(row=2) self.button2 = Button (frame,text="quit",command=frame.quit) self.button2.grid(row=2,column=1) frame.grid() def simpleprint(a,b): print a,b root = Tk() ap = door(root) root.mainloop()
Comment