Getting more information from button_handler #1379
Answered
by
nuclearfall
nuclearfall
asked this question in
Q&A
-
I have a grid of buttons constructed using boxes (I think this is the right way to go about this in Toga, but not entirely sure). Is there a way for me to determine using the on_press which button was pressed? They are displayed using a for loop class. Think something like minesweeper. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
nuclearfall
Dec 10, 2021
Replies: 1 comment 2 replies
-
I figured out one way was to keep the id along with the row and column in a list of dictionaries and look it up from widget.id in the callback method, if anyone else is stupid enough not to know a solution. ;) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
nuclearfall
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I figured out one way was to keep the id along with the row and column in a list of dictionaries and look it up from widget.id in the callback method, if anyone else is stupid enough not to know a solution. ;)