import anytk5 as g f = g.frame(1, "sample GUI Window", 750, 500) user = g.text_field() user.size = (100, 50) user.pos = (50, 40) lb1 = g.static_text() lb1.pos = (50, 20) lb1.size = (100, 20) lb1.label = "Name" f.append(lb1) f.append(user) user2 = g.text_field() user2.size = (100, 50) user2.pos = (50, 120) lb2 = g.static_text() lb2.pos = (50, 100) lb2.size = (100, 20) lb2.label = "Entry Number" f.append(lb2) f.append(user2) tbox = g.text_area() tbox.pos = (300, 40) tbox.size = (400, 130) f.append(tbox) def SubmitButtonClick(event):
def bdotclick(): val = '.' # get existing text box text txt = text.get_text() # append text txt = txt + val # update text box text text.set_text(txt) def bacclick(): val = '' text.set_text(val) f = g.frame(1, "calculator", 510, 400) text = g.text_field() text.pos = (20, 10) text.size = (480, 40) text.label = "" f.append(text) #nums' bac = g.button() bac.label = "AC" bac.size = (80, 60) bac.pos = (300, 60) bac.onclick(bacclick) f.append(bac)
elif(str(New_Passps1).isdigit()): #Invalidates if password contains only digits not a combination. print(" Error !!!!! Entered password containg only numeral.Enter alphanumeric values") return False else : #print ("Password Successfully Changed. !"); print (" Your Password Is Successfully Changed :)"); return True else: # Invalidates if password have non-alphanumeric characters. print (" Error !!!!! Special characters are not allowed.Enter only alphamueric values "); return False #Constructor canvas if __name__=='__main__': f=g.frame(1,"password checker",510,300) User_Name=g.text_field() User_Name.pos=(20,60) User_Name.size=(150,20) User_Name.label="User_Name" l1=g.static_text() l1.pos=(20,20) l1.label="User Name" f.append(l1) f.append(User_Name) Old_Pass=g.text_field2()
text.set_text(txt) def bdotclick(): val = '.' # get existing text box text txt = text.get_text() # append text txt = txt + val # update text box text text.set_text(txt) def bacclick(): val = '' text.set_text(val) f=g.frame(1,"calculator",510,400) text=g.text_field() text.pos=(20,10) text.size=(480,40) text.label="" f.append(text) #nums' bac=g.button() bac.label="AC" bac.size=(80,60) bac.pos=(300,60) bac.onclick(bacclick) f.append(bac)
import anytk5 as g f=g.frame(1,"sample GUI Window",750,500) user=g.text_field() user.size=(100,50) user.pos=(50,40) lb1=g.static_text() lb1.pos=(50,20) lb1.size=(100,20) lb1.label="Name" f.append(lb1) f.append(user) user2=g.text_field() user2.size=(100,50) user2.pos=(50,120) lb2=g.static_text() lb2.pos=(50,100) lb2.size=(100,20) lb2.label="Entry Number" f.append(lb2) f.append(user2) tbox=g.text_area() tbox.pos=(300,40) tbox.size=(400,130) f.append(tbox) def SubmitButtonClick(event):