TomSchimansky / TomSchimansky/CustomTkinter

The button clicks are not working when i add combobox widget in my app running on mac os 14.1.2.

Open
#2,132 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
13.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

The app works well on windows. But when i run in mac os the button clicks are only working by clicking the button and giving it a slight drag. Below is a simpler code to reproduce the issue:

            import customtkinter as ctk

            c = 0
            
            def clickEvent():
                global c
                c += 1
                c_label.configure(text=f"Clicked: {c} time")
            
            def boxSelect(event):
                selected_value = box.get()
                label.configure(text=f"Selected: {selected_value}")
            
            root = ctk.CTk()
            
            button = ctk.CTkButton(root, text="Click me", command=clickEvent)
            button.pack(padx=20, pady=10)
            
            c_label = ctk.CTkLabel(root, text="CLicked: ")
            c_label.pack(padx=20,pady=10)
            
            box = ctk.CTkComboBox(root, values=['1', '2', '3', '4', '5'],command=boxSelect)
            box.pack(padx=20, pady=10)
            
            label = ctk.CTkLabel(root, text="Selected: ")
            label.pack(pady=10)
            
            root.mainloop()

When i select a item from combobox and then clicks the button or combobox button again, the click problem starts. This is coming often and sometime works normal till i select the combobox item.

i am working on Anaconda environment and tested on :

    python 3.8,3.9,3.11,3.12

Found a similar issue on https://github.com/PySimpleGUI/PySimpleGUI/issues/6541 but upgrading doesnt fix the issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the minimal reproduction script on macOS 14.1.2 with the listed Python versions, then focus on the CTkComboBox and CTkButton interaction after an item is selected. Done means button and combobox clicks work normally after selection, with the behavior checked against the Windows result.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.