Two tabs using a ttk laptop, but separate features for two?

I am currently creating a GUI using tk, I have implemented a ttk notepad to have two separate tabs, each of these tabs stores data, but calls the same functions to interact with this data, is this a reasonable way to do this? Or should I just do more functions to call them separately? They need to know which tab is currently selected.

Thanks.

+4
source share
2 answers

okay, this might not be the best way, but for each widget on the tabs, pass the variable in the functions, which will then be used in the if statement to check the selected tab, since you're only using two, can it be a Boolean? if more is needed, a more complicated step is required, but this is an easy way to do it, but not really: p xx

+1
source

Here is a link to show you how to do this, hope this helps =]

Tkinter laptop demo

+3
source

Source: https://habr.com/ru/post/1442350/


All Articles