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