Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tkinter breaks when mixing tk.Checkbutton and ttk.Checkbutton #116484

Closed
Labels
@BartolHrg

Description

@BartolHrg

Bug report

Bug description:

When mixing tk.Checkbutton and ttk.Checkbutton (and maybe custom class Checkbutton)
tkinter behaves weirdly (calling method of one object changes the other too).
It is because ofname collision.

importtkinterastkfromtkinterimportttkwn=tk.Tk()tk.Checkbutton(wn)ttk.Checkbutton(wn)print(tk.Checkbutton(wn).winfo_name())print(ttk.Checkbutton(wn).winfo_name())

this example prints

!checkbutton2!checkbutton2

This happens because oftk.Checkbutton._setup overriden method
which is not called in ttk.Checkbutton.
I think that that method can beerased, whichwould solve the problem,
but I'm not sure why it is there in the first place.

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp