TomSchimansky / TomSchimansky/CustomTkinter
Feature request: disable/active tab of CTkTabview
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
It would be useful to be able disable/enable state tab(s) of CTkTabview:
import tkinter as tk
import customtkinter
tabview = customtkinter.CTkTabview(master=master, state=tk.ACTIVE)
tabview.grid(column=0, row=0)
tabview.add('Tab1')
tabview.add('Tab2')
tabview.tab("Tab2").configure(state=tk.DISABLED)
Result:
File "D:\dcspy_dev\venv\lib\site-packages\customtkinter\windows\widgets\ctk_frame.py", line 167, in configure
super().configure(require_redraw=require_redraw, **kwargs)
File "D:\dcspy_dev\venv\lib\site-packages\customtkinter\windows\widgets\core_widget_classes\ctk_base_class.py", line 135, in configure
check_kwargs_empty(kwargs, raise_error=True)
File "D:\dcspy_dev\venv\lib\site-packages\customtkinter\windows\widgets\utility\utility_functions.py", line 18, in check_kwargs_empty
raise ValueError(f"{list(kwargs_dict.keys())} are not supported arguments. Look at the documentation for supported arguments.")
ValueError: ['state'] are not supported arguments. Look at the documentation for supported arguments.
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 tracing CTkTabview's tab("Tab2").configure path and the configure handling shown in windows/widgets/ctk_frame.py. Done means tabs can accept the requested state values and disabling a tab prevents it from being active, while enabling it restores normal use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100