j4321 / tkcalendar

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

Always on top bug using resizable #62

Closed VShkaberda closed 4 years ago

VShkaberda commented 4 years ago

Bug appears after updating from version 1.5.0 to 1.5.1. After using resizable method of tkinter.Tk with parameters True main window behaviour changes to always on top. Reproducable example based on example3 from readme. Bug appears after clicking on DateEntry:

from tkcalendar import Calendar, DateEntry
import tkinter as tk
from tkinter import ttk

def example3():
    top = tk.Toplevel(root)
    ttk.Label(top, text='Choose date').pack(padx=10, pady=10)
    cal = DateEntry(top, width=12, background='darkblue',
                    foreground='white', borderwidth=2, year=2010)
    cal.pack(padx=10, pady=10)
    root.resizable(width=True, height=True)  # bug cause

root = tk.Tk()
ttk.Button(root, text='DateEntry', command=example3).pack(padx=10, pady=10)
root.mainloop()

OS: Win10. Bug doesn't exist in Linux (AntiX). tkcal_alwaysontop