-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
currently if we change the cursor of the dateentry the whole the entry's cursor gets changed
but in my solution we can keep the entry's cursor intact and just change the cursor of the drop down arrow using the following:
this is the function in the dateentry.py and my addition is just the **kwargs part
def _on_motion(self, event,**kwargs):
"""Set widget state depending on mouse position to mimic Combobox behavior."""
x, y = event.x, event.y
if 'disabled' not in self.state():
if self.identify(x, y) == self._downarrow_name:
self.state(['active'])
ttk.Entry.configure(self, cursor=kwargs['cursor'])
else:
self.state(['!active'])
ttk.Entry.configure(self, cursor=self._cursor)
so we can use it like :
date_entry = DateEntry(frame)
date_entry.bind("",lambda event,cursor="hand2":date_entry._on_motion(event,cursor="hand2"))
Metadata
Metadata
Assignees
Labels
No labels