Closed RhetTbull closed 1 year ago
class Generic(Element) would allow wrapping of any Tk compatible widget.
class Generic(Element)
class Generic(Element): def __init__(self, element, *args, **kwargs): pass def create_element(self): self.element = element(parent, *args, **kwargs)
For example:
from tkcalendar import Calendar import guitk import datetime class TestCalendar(Window): today = datetime.date.today() mindate = datetime.date(year=2018, month=1, day=21) maxdate = today + datetime.timedelta(days=5) layout = [[ttk.Generic(Calendar, font="Arial 14", selectmode='day', locale='en_US', mindate=mindate, maxdate=maxdate, disabledforeground='red', cursor="hand1", year=2018, month=2, day=5)]]
Could Widget() be used for this?
Widget()
Implemented with Widget()
class Generic(Element)
would allow wrapping of any Tk compatible widget.For example: