|
通过该函数可以自动调整notebook的大小。
注意事项,该函数要发在布局代码的末尾。
class GSFgui(Frame):
def __init__(self,parent=None,**kwargs):
w1=20
w2=20
w3=20
w3_12=10
w3_22=10
Frame.__init__(self,parent,**kwargs)
self.pack(expand=YES,fill=BOTH)
self.master.title("The Process of the Prediction Pockets by the GSF method")
# create all tabs, develop->Find->Advance->Rank->Result
notebook = Pmw.NoteBook(self)
notebook.pack(expand=YES,fill=BOTH)
#notebook.grid()
develop_tab=notebook.add('develop')
notebook.tab('develop').focus_set()
# next notebook tab
find_tab=notebook.add('Find') #find_tab can be regarded as a Frame
descriptors_tab = notebook.add('Advanced')
rank_tab = notebook.add('Rank')
result_tab=notebook.add('Result')
################################start: develop_tab##################################################################
#deve_frame=develop_tab
deve_frame=Frame(develop_tab)
deve_frame.grid()
#set parameters
pdbf=Frame(deve_frame)
pdbf.pack()
code... ...
... ....
notebook.setnaturalsize()
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-26 22:19
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社