You can reference a label from your code as you did through the ids dict.
Look to make sure in python you are not expecting that an id property was associated with a widget.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/34c0c08d-5a64-455f-8b90-21a8868c648fn%40googlegroups.com.
The id is a kv construct, not a widget property. See: https://kivy.org/doc/stable/api-kivy.lang.html?highlight=lang#ids
You put an id in kv, and when the kv is processed it creates an ids dictionary.
So you can do:
BoxLayout:
Label:
id: label_1
and access with widget in python using ids
You can not do:
Label(text=’Hello’, id=’WTF’)
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c2c40f74-9bab-4d6e-8742-a5375ce66ec5n%40googlegroups.com.
Also see: https://kivy.org/doc/stable-1.11.1/api-kivy.uix.widget.html?highlight=ids#kivy.uix.widget.Widget.id
Notice the deprecation message.
From: Elliot Garbus
Sent: Tuesday, April 5, 2022 6:07 AM
To: kivy-...@googlegroups.com
Subject: RE: [kivy-users] Upgrading from 1.11.1 to 2.1 breaks on ids
The id is a kv construct, not a widget property. See: https://kivy.org/doc/stable/api-kivy.lang.html?highlight=lang#ids
You put an id in kv, and when the kv is processed it creates an ids dictionary.
So you can do:
BoxLayout:
Label:
id: label_1
and access with widget in python using ids
You can not do:
Label(text=’Hello’, id=’WTF’)
From: zensku...@gmail.com
Sent: Tuesday, April 5, 2022 4:48 AM
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c2c40f74-9bab-4d6e-8742-a5375ce66ec5n%40googlegroups.com.