viewergrid.py 文件源码

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

项目:PyFlowChart 作者: steelcowboy 项目源码 文件源码
def __init__(self, years=4):
        Gtk.Grid.__init__(self)
        # Tells which position the rightmost column is
        self.width = 0

        self.nth = {
            1: "First",
            2: "Second",
            3: "Third",
            4: "Fourth",
            5: "Fifth",
            6: "Sixth"
        }
        self.year_map = {}

        self.set_margin_top(10)
        self.set_margin_bottom(10)
        self.set_margin_start(10)
        self.set_margin_end(10)

        horizontal_separator = Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL)
        horizontal_separator.set_margin_top(5)
        horizontal_separator.set_margin_bottom(10)
        self.attach(horizontal_separator, 0, 1, 2, 1)

        for x in range(1,years+1):
            self.add_year(x)

        self.show_all()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号