wize.py 文件源码

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

项目:wxWize 作者: AndersMunch 项目源码 文件源码
def create_postorder(self):
        prev_x = prev_y = prev_xspan = prev_yspan = 0
        for c in self.zchildren:
            x,y = c.x,c.y
            if x is None and y is None:
                x,y = prev_x,prev_y
                if self.orient == wx.HORIZONTAL:
                    x += prev_xspan
                elif self.orient == wx.VERTICAL:
                    y += prev_yspan
                else:
                    raise TypeError('%s position unspecified' % (c,))
            elif x is None:
                x = prev_x
                if y < prev_y + prev_yspan:
                    x += 1
            elif y is None:
                y = prev_y
                if x < prev_x + prev_xspan:
                    y += 1
            if c.border > 0 and (c.flag & wx.ALL)==0:
                c.flag |= wx.ALL
            c.sizer_item = self.w.Add(c.sized, (y,x), (c.yspan,c.xspan), c.flag, c.border)
            prev_x, prev_y, prev_xspan, prev_yspan = x,y,c.xspan,c.yspan
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号