Closed Miav771 closed 4 years ago
Sorry, I completely forgot about this issue. I don't have much time to look at that right now, but one idea would be to store the components in a vector and somehow convert the row index to the vector index in order to send the message to the right widget.
Have you been able to try my idea? Or do you still need help?
Please reopen this issue if you still need help on it.
I have this code based on the widget-list example, except it uses a ListBox and a custom HeaderBar.
I want to make activating (clicking on) a row of the
ListBox
send a message to theListBoxRow
that was activated and increment itsCounter
.I also want to add a new button to the
Counter
namedRemove
. I want clicking on this button to send a message toListBox
to remove this specific counter.There are examples and tests that show how to achieve similar effect with a fixed amount of children but none that explain how to do it with a dynamically changing children located in a
Vec
in theModel
.