Skip to content

Creating a ttk.Treeview causes CustomTkinter widgets to lose their custom rendering on Python 3.14.4 #2854

Description

@leninnair

Environment

OS: Windows 11 (64-bit)

Python: 3.14.4
Tkinter: Tk 8.6
CustomTkinter: 6.0.0

Name: customtkinter
Version: 6.0.0

Description

Creating a standard tkinter.ttk.Treeview inside a CTk application causes all existing CustomTkinter widgets (buttons, labels, option menus, etc.) to lose their CustomTkinter appearance.

The issue occurs immediately after creating the Treeview. The Treeview does not even need to be packed or gridded.

This happens with a minimal reproducible example.

Minimal reproducible example

import customtkinter as ctk
import tkinter.ttk as ttk

ctk.set_appearance_mode("Dark")

app = ctk.CTk()
app.geometry("800x500")

sidebar = ctk.CTkFrame(app, width=200)
sidebar.pack(side="left", fill="y")

ctk.CTkButton(
    sidebar,
    text="Button"
).pack(pady=20)

main = ctk.CTkFrame(app)
main.pack(side="left", fill="both", expand=True)

# Creating the Treeview is enough
tree = ttk.Treeview(main)

app.mainloop()

Expected Behavior

The CTkButton should retain its normal CustomTkinter appearance:

  • Rounded corners
  • Proper padding
  • Correct text rendering
  • CustomTkinter styling

Actual Behavior

Immediately after creating the Treeview:

  • CTkButton loses its rounded appearance.
  • Button text appears inside a small white rectangle.
  • Other CTk widgets (labels, option menus, etc.) also lose their styling.
  • The application appears to fall back to native Tk rendering.

The issue occurs even if the Treeview is never packed or gridded.

Additional Information

  • The issue is reproducible in a minimal example.
  • It is not related to:
    • ttkbootstrap
    • grid layout
    • CTkScrollableFrame
    • Treeview size
  • Replacing the Treeview with a standard tk.Text widget does not reproduce the issue.

Screenshot

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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