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()
评论列表
文章目录