本文整理匯總了Python中swampy.Gui.geometry方法的典型用法代碼示例。如果您正苦於以下問題:Python Gui.geometry方法的具體用法?Python Gui.geometry怎麽用?Python Gui.geometry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類swampy.Gui
的用法示例。
在下文中一共展示了Gui.geometry方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: figure9
# 需要導入模塊: from swampy import Gui [as 別名]
# 或者: from swampy.Gui import geometry [as 別名]
def figure9():
print 'Figure 17.7 a'
g = Gui()
options = dict(side=LEFT)
b1 = g.bu(text='OK', command=g.quit, **options)
b2 = g.bu(text='Cancel', **options)
b3 = g.bu(text='Help', **options)
g.geometry('300x150')
g.mainloop()
示例2: ques_pos
# 需要導入模塊: from swampy import Gui [as 別名]
# 或者: from swampy.Gui import geometry [as 別名]
global presuf
presuf=sample(list2, 4)[:]
r=randint(1,2)
if r==1:
ques_pos()
elif r==2:
ques_neg()
def close(event=NONE):
if tkMessageBox.askyesno("Quit","Do You Want To Quit???"):
p.destroy()
p=Gui()
p.title('Sentiment Analysis')
p.geometry(newGeometry='700x500')
fr=p.fr()
canint=p.ca(bg='green')
imag=Image.open('pic1.jpg')
imag2=ImageTk.PhotoImage(imag)
canint.image([300,-200],image=imag2)
canint.image=imag2
var=IntVar(0)
var2=IntVar(0)
but1=p.bu('YES',command=start,font=('bold',15), bg='red', fg='white', activebackground='white',activeforeground='red',bd=8).place(x=175,y=370, height=50, width=80)
p.bind('y',start)
but2=p.bu('NO',command=close,font=('bold',15), bg='red', fg='white', activebackground='white',activeforeground='red',bd=8).place(x=450,y=370, height=50, width=80)
item1=canint.create_text(350,140,text="\nWelcome!!!\n Hope You Had A Great Day Till Now.\nIf Not, We Are Gonna Make It Great With This Program!!!\n\n\nSo Shall We Begin???",font=('BOOKMAN OLD STYLE',17,'bold'),justify=CENTER,fill='white')
p.bind('n',close)
p.mainloop()