Exemple #1
0
 def __init__(self, master=None, **kw):
     DateEntry.__init__(self, master=None, **kw)
     self._top_cal.configure(bg='black', bd=1)
     tk.Label(self._top_cal,
              bg='gray90',
              anchor='w',
              text='Today: %s' % date.today()).pack(fill='x')
 def __init__(self, master=None, **kw):
             DateEntry.__init__(self, master=None, **kw)
             
             today='{:}-{:}-{:}'.format(times.strftime('%Y'), times.strftime('%m'),times.strftime('%d'))
             self._top_cal.configure(bg='black', bd=2)
             #在日曆添加黑色外邊框
             tk.Label(self._top_cal, bg='gray90', anchor='w',
             #
                      text='今天日期為:{:}'.format(today)).pack(fill='x')
 def __init__(self, master=None, **kw):
     DateEntry.__init__(self, master=None, **kw)
     # add black border around drop-down calendar
     self._top_cal.configure(bg='black', bd=1)
     # add label displaying today's date below
     tk.Label(self._top_cal,
              bg='gray90',
              anchor='w',
              text='Today: %s' % date.today().strftime('%x')).pack(fill='x')
    def __init__(self, master=None, **kw):
        """
        Init method of the 'MyDateEntry' class.
        :param master: Instance of the main Tk window.
        :param kw: Pass all key-word arguments.
        """

        DateEntry.__init__(self, master=master, **kw)
        # Add black border around drop-down calendar
        self._top_cal.configure(bg="black", bd=1)
        # Add label displaying today's date below
        tk.Label(
            self._top_cal, bg="gray90", anchor="w", text="Today: %s" % date.today().strftime("%x")
        ).pack(fill="x")
Exemple #5
0
 def __init__(self, master=None, align='left', **kw):
     DateEntry.__init__(self, master, **kw)
     self.align = align