autodataming的个人博客分享 http://blog.sciencenet.cn/u/autodataming

博文

Python PMW notebook的大小

已有 2620 次阅读 2016-12-30 12:27 |系统分类:科研笔记

notebook.setnaturalsize()

通过该函数可以自动调整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()  



https://blog.sciencenet.cn/blog-950202-1024251.html

上一篇:schrodinger 对接后处理 DOCKING POST-PROCESSING 注意事项
下一篇:schrodinger 命令行处理超大化合物库
收藏 IP: 202.127.19.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-30 04:01

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部