Pass class / object of type CTkFrame directly into TabView.add #2678
NiicoNiicoDev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Find it somewhat strange how you can't directly add a pre-defined CTkFrame straight into a tabview as a new tab. The only alternative i've found it to create an empty TabView tab (inherently just a just an empty CTkFrame) and then add the pre-defined CTkFrame object as a child of the newly created TabView Frame.
Apologies if that previous statement is confusing. Here is some code snippets for clarification:
Home Class :
GUI Class:
My thoughts are that it would be considerably simpler, more readable and just simply better if you could just do the following
self.home = self.tab_view.add(Home(self, fg_color="transparent")
Beta Was this translation helpful? Give feedback.
All reactions