C
C#3y ago
SenNerd

❔ How can I do this?

So you can add "tasks" to the listbox and when you press "verwijderen" it removes the items but when you press "terugzetten" it put's the last removed item back in the list. the items also have a background color that needs to be there when you press the undo button
8 Replies
barcode
barcode3y ago
so terugzetten is undo what happens when you press terugzetten multiple times
SenNerd
SenNerdOP3y ago
yes only needs to do the last removed item
barcode
barcode3y ago
so if you press terugzetten multiple times whath appens*
SenNerd
SenNerdOP3y ago
if you remove 1 item and press terugzetten it puts the 1 item back in the list
SenNerd
SenNerdOP3y ago
you press "verwijderen" the selected item is removed from the list you press "terugzetten" the item is back
SenNerd
SenNerdOP3y ago
I think I need to use a Stack<ListBoxItem> but no id how they work or what it is
TheBoxyBear
TheBoxyBear3y ago
You can use just a list and insert or remove values based on the index A stack is like a pile of things. You put new things in top of the old ones and when you want to remove something, you have to start from the top.
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?