sortlistctrl.py 文件源码

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

项目:fritzchecksum 作者: mementum 项目源码 文件源码
def InsertColumnMixin(self, col, heading,
                          format=wx.LIST_FORMAT_LEFT, width=-1):
        '''Replaces ListCtrl InsertColumn to keep the ascending/descending sort flags
        sync'ed with column insertion

        The reason to do this: if put on the right hand side of the "base
        classes" list a plain InsertColumn method would not be found and Mixins
        are usually put on the right hand side
        '''
        index = self.InsertColumnOrig(col, heading, format, width)
        if index != -1:
            # Colum insert: Insert a sorting flag in the returned index
            self.sortflags.insert(index, True)
            if self.col >= index:
                # Fix index of last sorted column because we added to the left
                self.col += 1

        return index
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号