TomSchimansky / TomSchimansky/CustomTkinter

root.focus_get() dont detect if the focus is on custom tkinter entrys .

Open
#610 2 comments 1 reaction 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

import customtkinter
from tkinter import *


def test(event):
    if root.focus_get() == custom_entry:
        print("custom_entry")
    elif root.focus_get() == ttk_entry:
        print("ttk_entry")


root = customtkinter.CTk()

custom_entry = customtkinter.CTkEntry(root)   #CTkEntry
custom_entry.pack()

ttk_entry = Entry(root)                       #ttk_entry
ttk_entry.pack()

root.bind("<Return>", test)
root.mainloop()

when I click on the ttk entry and press enter it print ----> "ttk_entry"

But when I do the same thing to the customtkinter.CTkEntry it print nothing .

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 provided Python example with a customtkinter.CTkEntry and a tkinter Entry, then inspect the focus handling around root.focus_get() and CTkEntry. Done means pressing Return after focusing either entry identifies the focused widget consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.