Jun-09-2021, 12:30 AM
Hello!
Lately I have been trying my luck on kivy, and I'm always having problem when I try to access attributes that have been defined in the .kv
For example, this time I'm trying to access the attributes of my buttons inside my class SlidingPopup (id:btn_yes and id:btn_no) where I'm using it in the FloatLayout.
Lately I have been trying my luck on kivy, and I'm always having problem when I try to access attributes that have been defined in the .kv
For example, this time I'm trying to access the attributes of my buttons inside my class SlidingPopup (id:btn_yes and id:btn_no) where I'm using it in the FloatLayout.
<SlidingPopup@GridLayout>: id:class_sliding btn_no: btn_no rows:2 canvas: Color: rgba: 1,1,1,.8 Rectangle: size: self.size pos: self.pos Label: text: "Are you sure?" font_size: 24 GridLayout: rows: 1 spacing: 10 padding: 10 Button: id: btn_no text: "No" color: 1,0,0,1 Button: id: btn_yes text: "Yes" color: 0,0,0,1 FloatLayout: Button: size_hint: .3,.3 pos_hint: {"center_x": .5, "center_y": .5} text:"Open Menu" on_release: app.show_the_button(the_sliding_menu) SlidingPopup: id: the_sliding_menu size_hint: 1, .3 top_hint: 0 pos_hint: {"top":self.top_hint, "right":1}I'm just looking for a way to define their bindings where I'm using them and not in the class definition (something like btn_no.one_release: ... but that actually works :D). Someone who can give me a hand with their wisdom?