PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Padding

UITableLayout

UDim2

Padding will position elements with extra space between them. This can be done using Scale or Offset components of UDim2. Negative values can bring elements closer together. When non-zero, the sibling UI elements may be visible between the cells contained within them. In the image below, you can see the padding of 5 pixels applied between the cells (and the sibling UI elements acting as rows in yellow).

UITableLayout with padding between cells


Code Samples


Build UI Table

This code sample builds a table of 4 rows, the first having headers. It does this using some for-loops and a UITableLayout. The widths of each column are set using UISizeConstraints.