C
C#2y ago
senne1009

❔ 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
barcode2y ago
so terugzetten is undo what happens when you press terugzetten multiple times
senne1009
senne10092y ago
yes only needs to do the last removed item
barcode
barcode2y ago
so if you press terugzetten multiple times whath appens*
senne1009
senne10092y ago
if you remove 1 item and press terugzetten it puts the 1 item back in the list
senne1009
senne10092y ago
you press "verwijderen" the selected item is removed from the list you press "terugzetten" the item is back
senne1009
senne10092y ago
I think I need to use a Stack<ListBoxItem> but no id how they work or what it is
TheBoxyBear
TheBoxyBear2y 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
Accord2y 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.