TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
10.77k stars 1.03k forks source link

CTkTabview allowing to change tabs when CTkTabview_obj.configure(state="disable") #2424

Open tsouzadaSSA opened 1 month ago

tsouzadaSSA commented 1 month ago

CTkTabview allowing to change tabs when CTkTabview_obj.configure(state="disable") - At least no error is raised.

I have even tried to disable its buttons directly by: CTkTabview_obj._segmented_button._buttons_dict["whatever_tab_name"].configure(state="disable") but as well, the CTkTabview is allowing to change tabs. In this case there were errors with I guess the button callbacks which were disabled: invalid command name "2859941617024" while executing "2859941617024" ("after" script)

I have also tried to configure the tab item:

CTkTabview_obj = customtkinter.CTkTabview(frame_A)
tab_A = CTkTabview_obj .add("whatever_tab_name")
tab_A.configure(state="disable")

It didn't work and I got: 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.

What am I doing wrong? How should I disable the tabs?