Skip to content

Fix: disabled CTkEntry placeholder becoming an actual value - #2863

Open
jackaopen wants to merge 1 commit into
TomSchimansky:developfrom
jackaopen:fix-disabled-entry-placeholder
Open

Fix: disabled CTkEntry placeholder becoming an actual value#2863
jackaopen wants to merge 1 commit into
TomSchimansky:developfrom
jackaopen:fix-disabled-entry-placeholder

Conversation

@jackaopen

Copy link
Copy Markdown

Problem

When a CTkEntry with an active placeholder is disabled and clicked, its
placeholder is deactivated. Because the underlying tkinter.Entry cannot delete
text while disabled, the placeholder remains and is returned as an actual value
after the entry is enabled again.

Fix

Prevent placeholder deactivation when the entry state is either disabled or
readonly.

Testing

Verified locally with this sequence:

  1. Create an entry with a placeholder.
  2. Disable and click the entry.
  3. Enable the entry again.
  4. Confirm that get() returns an empty string instead of the placeholder.

The local regression test passed.

@FedericoSpada

Copy link
Copy Markdown
Collaborator

Hi,
The problem is already solved in the repository that I've created to continue development.
I'll release the new version on PyPI soon.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants