j4321 / tkcalendar

Calendar widget for Tkinter
https://pypi.python.org/pypi/tkcalendar
GNU General Public License v3.0
98 stars 33 forks source link

Hide calendar bug #51

Closed Tech-GS closed 4 years ago

Tech-GS commented 4 years ago

Pressing the Combobox list button again when the calendar is open does not hide it, but reopens it.

Solution to the problem in "tkcalendar.py":

    def _on_focus_out_cal(self, event):
        if self.focus_get() is not None:
            ...
        else:
            if 'active' in self.state():  # if xc <= x <= xc + w and yc <= y <= yc + h:
                self._calendar.focus_force()
            else:
            ...
j4321 commented 4 years ago

Thanks for telling me. I had not notice because, like #49, it does not happen in Linux.

Tech-GS commented 4 years ago

Problem solved.