tkcalendar.py 文件源码

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

项目:tk_tools 作者: slightlynybbled 项目源码 文件源码
def __place_widgets(self):
        # header frame and its widgets
        hframe = tkinter.ttk.Frame(self)
        lbtn = tkinter.ttk.Button(hframe,
                                  style='L.TButton',
                                  command=self._prev_month)
        rbtn = tkinter.ttk.Button(hframe,
                                  style='R.TButton',
                                  command=self._next_month)
        self._header = tkinter.ttk.Label(hframe, width=15, anchor='center')
        # the calendar
        self._calendar = tkinter.ttk.Treeview(self, show='',
                                              selectmode='none', height=7)

        # pack the widgets
        hframe.pack(in_=self, side='top', pady=4, anchor='center')
        lbtn.grid(in_=hframe)
        self._header.grid(in_=hframe, column=1, row=0, padx=12)
        rbtn.grid(in_=hframe, column=2, row=0)
        self._calendar.pack(in_=self, expand=1, fill='both', side='bottom')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号