israel-dryer / ttkbootstrap

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
MIT License
1.78k stars 358 forks source link

Calendar doesn't pop up #573

Open CodingLama opened 1 month ago

CodingLama commented 1 month ago

Desktop (please complete the following information):

ttkbootstrap Version 1.10.1. OS: Ubuntu

Describe the bug

If I click on the calendar icon, nothing happens, no calendar popup.

To Reproduce

The code:

import tkinter as tk
import ttkbootstrap as ttk
...
from ttkbootstrap.widgets import DateEntry
okno = ttk.Window(themename = "darkly")
okno.title("DateEntry")
okno.geometry("400x400")
...
kalendar = DateEntry(okno)
kalendar.pack(pady = 10)
okno.mainloop()

Expected behavior

The pop-up window with the calendar appears.

Screenshots

No response

Additional context

Error message:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/home/juan/.local/lib/python3.10/site-packages/ttkbootstrap/widgets.py", line 242, in _on_date_ask
    new_date = Querybox.get_date(
  File "/home/juan/.local/lib/python3.10/site-packages/ttkbootstrap/dialogs/dialogs.py", line 1671, in get_date
    chooser = DatePickerDialog(
  File "/home/juan/.local/lib/python3.10/site-packages/ttkbootstrap/dialogs/dialogs.py", line 601, in __init__
    self.root = ttk.Toplevel(
  File "/home/juan/.local/lib/python3.10/site-packages/ttkbootstrap/window.py", line 472, in __init__
    self.wait_visibility(self)
  File "/usr/lib/python3.10/tkinter/__init__.py", line 730, in wait_visibility
    self.tk.call('tkwait', 'visibility', window._w)
_tkinter.TclError: window ".!toplevel" was deleted before its visibility changed