gui.py 文件源码

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

项目:Cosplay2-Automation 作者: Himura2la 项目源码 文件源码
def grid_set_shape(self, new_rows, new_cols, default_col_size=None):
        current_rows, current_cols = self.grid.GetNumberRows(), self.grid.GetNumberCols()
        if new_rows < current_rows:
            self.grid.DeleteRows(0, current_rows - new_rows, True)
        if new_cols < current_cols:
            self.grid.DeleteCols(0, current_cols - new_cols, True)
        if new_rows > current_rows:
            self.grid.AppendRows(new_rows - current_rows)
        if new_cols > current_cols:
            self.grid.AppendCols(new_cols - current_cols)

        if default_col_size:
            map(lambda col: self.grid.SetColSize(col, default_col_size), range(new_cols))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号