S
S
Stas Povalyaev2021-12-21 18:41:14
Python
Stas Povalyaev, 2021-12-21 18:41:14

How to change label on button click in .kv file?

How to make it so that when the button is pressed, 1 of the two labels changes its text?
At the same time, label and button in .kv file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2022-01-19
@cout_HelloWorld_andl

Declare variables at the class level and give them the ObjectProperty (None) property for all widgets, then write a color change method through the function, and in the kv file give the command to the button

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question