wróc
Zdjęcie do: Kivy: how to access widget's id defined in KV lang using string in Python code
ikona kalendarz 2022-10-24 00:00:00

Kivy: how to access widget's id defined in KV lang using string in Python code

Kivy allows to use .ids["name"] instead of .ids.name And this allows to use string formatting to create string with name .ids[f"label_{i}"].text .ids["label_{}".format(i)].text .ids["label_%s" % i].text In documentation Accessing Widgets defined inside Kv lang in your Python code you …
Przejdź do pełnego artykułu
ikona autor Autor
furas.pl
# prywatne notatki - Python, Linux, Machine Learning, etc.
Przejdź do strony

Wykorzystujemy pliki cookies. Szczegóły znajdziesz w polityce prywatności