Skip to content

can't change the cursor the dropdown arrow  #95

@arsalanshaikh13

Description

@arsalanshaikh13

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions