How to set kivy widget id from Python code file
问题 I need help assigning ids to new kivy widgets that are created from a python function I've tried : old = Label(id = 'old') and : old = Label() old.id = 'old' but it doesn't seem to work because, whenever i try referencing the widgets, it gives me an error 回答1: The ways that you have creating id in Python code are correct. But you cannot reference them using self.ids.old or self.ids['old'] because they don't exist in self.ids . The self.ids dictionary type property contains only all widgets