i tried this code but i am getting blank response from get command?? it is only in the class i am getting blank value..but if i make a function rather than a class i am getting value from text ...
from Tkinter import *
from ttk import Button,Entry,Style
import pickle
class Home(Frame):
def __init__(self,parent):
Frame.__init__(self,parent)
self.parent=parent
self.initUI()
def initUI(self):
self.parent.title("HOME SCREEN")
frame = Frame(self)
global a
global z
self.pack(fill=BOTH, expand=1)
label1=Label(frame,text="USERNAME",)
label2=Label(frame,text="PASSWORD")
text1=Entry(frame, show="*", width=15)
text2=Entry(frame,width=15)
login=Button(self,text="Login",command=self.load)
register=Button(self,text='Register',command=self.dump)
Quit=Button(self,text='Quit',command=self.quit)
delete=Button(self,text='Delete Account',command=self.delete)
showb=Button(self,text='Show Accounts',command=self.show)
label1.pack(side=LEFT)
text2.pack(side=LEFT, padx=5, pady=5)
label2.pack(side=LEFT )
text1.pack(side=LEFT, padx=5, pady=5)
frame.pack(fill=BOTH, expand=1)
Quit.pack(side=RIGHT ,padx=5, pady=5)
register.pack(side=RIGHT)
login.pack(side=RIGHT)
delete.pack(side=RIGHT)
showb.pack(side=RIGHT)
a=text1.get()
z=text2.get()