C
Join ServerC#
help
❔ How can I do this?
Ssenne10092/8/2023
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

Bbarcode2/8/2023
so terugzetten is undo
Bbarcode2/8/2023
what happens when you press terugzetten multiple times
Ssenne10092/8/2023
yes
Ssenne10092/8/2023
only needs to do the last removed item
Bbarcode2/8/2023
so if you press terugzetten multiple times whath appens*
Ssenne10092/8/2023
if you remove 1 item and press terugzetten it puts the 1 item back in the list
Ssenne10092/8/2023
you press "verwijderen" the selected item is removed from the list you press "terugzetten" the item is back

Ssenne10092/8/2023
I think I need to use a Stack<ListBoxItem> but no id how they work or what it is
TTheBoxyBear2/9/2023
You can use just a list and insert or remove values based on the index
TTheBoxyBear2/9/2023
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.
AAccord2/10/2023
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.