Reordering list

I’m trying to make a list system where frames inside a list frame can be deleted by a red x. If someone clicks the red x in the 3rd position, the rest of the frames will reorder themselves to be 1234… instead of 12 4.

I’ve tried multiple things, and I am genuinely stumped. Could someone please help me?

Can’t you make a table, then use table.remove to remove the index and then loop through the table to re-organize all the frames?

No idea how I would script that to edit the UDIM2 position.

What do you mean by the rest of the frames will reorder themselves to be 1234 instead of 12 4? Would that not be intended behavior?

So it’s not missing one in the middle, it would all just be in order where 4 → 3 and 5 → 4 and so on.

Are you using a UIListLayout?

1 Like

Thanks! How would I script the table to be in pair w/ the UI?

Wait, but are you using a UIListLayout?

If so you can just delete the frame, or do you need it to be linked with something?

Oh! Then that’ll work! That’s all I need.

1 Like