text.set_text(txt) def bacclick(event): 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) bmul=g.button() bmul.label="x" bmul.size=(60,60) bmul.pos=(230,60) bmul.onclick(bmulclick) f.append(bmul) b9=g.button()
rb1 = g.radio_buttons() rb1.size = (150, 20) rb1.add_rb("Awesome", 300, 230) rb1.add_rb("On Cloud Nine", 300, 260) rb1.add_rb("Lousy", 300, 290) rb1.set_true(2) f.append(rb1) lb6 = g.static_text() lb6.pos = (500, 190) lb6.label = ("Favourite Ice-Cream?") lb6.size = (180, 20) f.append(lb6) #icecream icecream = ['Butterscotch', 'Vanilla', 'Chocolate', 'Black Current'] combo_box = g.combo_box() combo_box.size = (200, 30) combo_box.labels = icecream combo_box.pos = (500, 230) combo_box.default = "Strawberry" f.append(combo_box) #button 1 button1 = g.button() button1.label = "Submit" button1.pos = (300, 350) button1.onclick(SubmitButtonClick) f.append(button1) f.show()
old.pos = (20, 60) old.size = (170, 30) old.label = "old password" f.append(old) new = g.text_field2() new.pos = (20, 100) new.size = (170, 30) new.label = "new password" f.append(new) confirm = g.text_field2() confirm.pos = (20, 140) confirm.size = (170, 30) confirm.label = "confirm new password" f.append(confirm) check = Pass(user, old, new, confirm) but = g.button() but.pos = (220, 100) but.label = "submit" #sl=g.Slider(0,10,20,100,50,180) #sp=g.SpinBox(0,80,300,160,50,50) but.onclick(check.valid) f.append(but) #f.append(sl) #f.append(sp) f.show()
NewPstb=g.text_field() NewPstb.pos=(20,80) NewPstb.size=(100,20) NewPstb.label="NewPstb password" f.add(NewPstb) ReNewPstb=g.text_field() ReNewPstb.pos=(20,110) ReNewPstb.size=(100,20) ReNewPstb.label="ReNewPstb NewPstb password" f.add(ReNewPstb) but=g.button() but.label="submit" but.onclick(Submit) f.add(but) f.show()
rb1 = g.radio_buttons() rb1.size = (150, 20) rb1.add_rb("Awesome", 300, 230) rb1.add_rb("On Cloud Nine", 300, 260) rb1.add_rb("Lousy", 300, 290) rb1.set_true(2) f.append(rb1) lb6 = g.static_text() lb6.pos = (500, 190) lb6.label = "Favourite Ice-Cream?" lb6.size = (180, 20) f.append(lb6) # icecream icecream = ["Butterscotch", "Vanilla", "Chocolate", "Black Current"] combo_box = g.combo_box() combo_box.size = (200, 30) combo_box.labels = icecream combo_box.pos = (500, 230) combo_box.default = "Strawberry" f.append(combo_box) # button 1 button1 = g.button() button1.label = "Submit" button1.pos = (300, 350) button1.onclick(SubmitButtonClick) f.append(button1) f.show()