Sorry, I did not express myself correctly, I want items spread, on each line the spaces between items are all the same.
Sorry, I did not express myself correctly, I want items spread, on each line the spaces between items are all the same.
Last edited by MathFurious; 2nd March 2018 at 21:10. Reason: reformatted to look better
OK, that isn't a whole lot different. To keep the layout class as generic as possible, you still need to calculate the width of all the items in each row, then adjust the x positions so that the space between each item is the same. This padding space will be equal to the leftover width / (nItems - 1). So, item 0 has no adjustment (it sits at the left margin of the layout), item 1 sits at item0.x + item0.width + padding, item 2 at item1.x + item1.width + padding, etc.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Ok, thanks.
Bookmarks