Answer the question
In order to leave comments, you need to log in
How to open a python file through another?
It is necessary to open another py file (in the form of a messagebox) by pressing a button. However, when this file is imported, the elements (Combobox, Button) are reflected on the first root, and then the root from the called file is opened on top of everything.
def close(): #функция вызывающая импорт другого py файла
import PSV_4 #он вызывает новый root, но элементы отражаются на старом
Answer the question
In order to leave comments, you need to log in
I figured it out myself ... in general, the idea is rather stupid: when declaring an element in the called file, you must specify its belonging to root in the form: (root, ...)
enter_button=ttk.Button(root, text="Вывод", command = final)
giver=ttk.Combobox(root, font=("Verdana", 12),
values=[
complete],
state="readonly",
postcommand=changeMonth)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question