Pmw.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:ecel 作者: ARL-UTEP-OC 项目源码 文件源码
def aligngrouptags(groups):
    # Adjust the y position of the tags in /groups/ so that they all
    # have the height of the highest tag.

    maxTagHeight = 0
    for group in groups:
        if group._tag is None:
            height = (string.atoi(str(group._ring.cget('borderwidth'))) +
                    string.atoi(str(group._ring.cget('highlightthickness'))))
        else:
            height = group._tag.winfo_reqheight()
        if maxTagHeight < height:
            maxTagHeight = height

    for group in groups:
        ringBorder = (string.atoi(str(group._ring.cget('borderwidth'))) +
                string.atoi(str(group._ring.cget('highlightthickness'))))
        topBorder = maxTagHeight / 2 - ringBorder / 2
        group._hull.grid_rowconfigure(0, minsize = topBorder)
        group._ring.grid_rowconfigure(0,
                minsize = maxTagHeight - topBorder - ringBorder)
        if group._tag is not None:
            group._tag.place(y = maxTagHeight / 2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号