Sanguineus
New member
- Local time
- Today, 10:30
- Joined
- May 5, 2020
- Messages
- 13
I have a listbox (that is bound to a table) that I will constrain to being able to hold at most 5 items. The listbox is split into three columns TimerNumber (integer 1 to 5), TimerName (string) and TimerValue (double).
I have controls set up that will allow the use to add and remove items from the listbox, but what I can't figure out is how to keep track and then allocate TimerNumbers.
For example:
User adds a timer which being the first item is allocated 1, they then add another which is allocated 2 - so far so good.
They then remove the timer in slot 1 so of the 5 slots only slot 2 is in use. Then user then adds another timer, which I would like to go back to slot 1.
I've spent a few hours over the course of the last couple of days trying to figure how to keep track of the available timer numbers...
Hopefully this makes sense!
I have controls set up that will allow the use to add and remove items from the listbox, but what I can't figure out is how to keep track and then allocate TimerNumbers.
For example:
User adds a timer which being the first item is allocated 1, they then add another which is allocated 2 - so far so good.
They then remove the timer in slot 1 so of the 5 slots only slot 2 is in use. Then user then adds another timer, which I would like to go back to slot 1.
I've spent a few hours over the course of the last couple of days trying to figure how to keep track of the available timer numbers...
Hopefully this makes sense!