Actionscript 3
I have been wrecking my head most today on the best way of going about this, but i end up over complicating what i would believe to be a simple task.
I have some TextFields lined up next to each other all fixed width, i.e ( [ width ])
tf1 tf2 tf3 tf4 tf5
[ 80 ][ 50 ][ 50 ][ 50 ][ 70 ]
What i want to do is be able to select which detail i want to show, and then redistribute the width of the removed TextField to the rest (note you can only remove from the right), so if i was to show up to "tf3", 120 (70+50) would need to be evenly distributed to the other boxes:
[ 80 + 50 + 50 = 180 ]
tf1
[80/180*120 + 80 = 133.3]
tf2
[50/180*120 + 50 = 83.3]
tf3
[50/180*120 + 50 = 83.3]
Then line them up again (x + width etc):
[ 133.3 ][ 83.3 ][ 83.3 ]
Any ideas of a better method, i sure there is some nice easy functions i can use to do this.
I probably have overcomplicated the question too now, but ill give it a try, anyone have any ideas?