Если нажата Choice_1_Button, а затем Start_Button, Start_Button должен вызвать foo1. Но когда пользователь нажимает Choice_2_Button, та же кнопка «Пуск» должна вызывать foo2.
Вот код, который у меня сейчас есть:
Код: Выделить всё
from tkinter import *
root=Tk()
Choice_1_Button=Button(root, text='Choice 1', command=something) #what should it do?
Choice_2_Button=Button(root, text='Choice 2', command=something_else)
Start_Button=Button(root, text='Start', command=if_something) #and what about this?
Подробнее здесь: https://stackoverflow.com/questions/500 ... statements
Мобильная версия