TomSchimansky / TomSchimansky/CustomTkinter
CTkTabview - cannot change name of open tab
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I've noticed that you cannot change a name of currently opened tab of CTkTabview by rename function.
It responds with errors:
_
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\tkinter_init_.py", line 1967, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Users\mikol\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
self._command()
File "C:\Users\mikol\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\customtkinter\windows\widgets\ctk_segmented_button.py", line 167, in
command=lambda v=value: self.set(v, from_button_callback=True),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mikol\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\customtkinter\windows\widgets\ctk_segmented_button.py", line 381, in set
self._command(self._current_value)
File "C:\Users\mikol\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\customtkinter\windows\widgets\ctk_tabview.py", line 104, in _segmented_button_callback
self._tab_dict[self._current_name].grid_forget()
_
Although its not severe issue, couse one can still change name when tab is inactive
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the active-tab rename case in CustomTkinter and read windows/widgets/ctk_tabview.py, especially _segmented_button_callback, where the traceback ends. Confirm the failure also occurs when selecting the renamed active tab, then verify that renaming inactive tabs still works and the active-tab case no longer raises the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100