-
I managed to use the "partial" method with rio.Button, as given in the documentation.
but what I really need is to use it with rio.Switch. I tried to use this syntax on Switch and failed. what am I missing? |
Beta Was this translation helpful? Give feedback.
Answered by
Nachsh
Dec 11, 2024
Replies: 1 comment 1 reply
-
It should work the same with a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Aran-Fey I got some confidence from your answer and I tried again. It works now!
my intake is that I need to place the 'event' last in the call for the 'on_change' function:
call:
on_change=functools.partial(self.on_led_change, curr_led)
func def:
def on_led_change(self, led: Led, event: rio.SwitchChangeEvent ):
Thanks!