TomSchimansky / TomSchimansky/CustomTkinter

Feature request: disable/active tab of CTkTabview

Open
#840 4 comments 0 reactions 0 assignees View on GitHub

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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.