[Python] How do I use the result of a spinbox used in a function in another function? [closed]

Discussão em 'Python' iniciado por Stack, Março 28, 2025.

  1. Stack

    Stack Membro Participativo

    I have a error message When I use command for spinbox. I want to use spinbox.get() but I cont. how I can fix this problem?

    def load_frame2():
    frame2 = Frame(windows, bg="gray")
    frame2.grid(row=0, column=0)
    spinbox = Spinbox(frame2, command=start)
    spinbox.grid(row=0, column=0)

    def start():
    value = spinbox.get()
    print(value)

    Continue reading...

Compartilhe esta Página