Hi,
I'm instantiating the lines in a table from code and although all the transforms look correct in the editor, visibly the lines are all stacked in one place. This is the code I'm using to instantiate:
private void FillTradeUI()
{
foreach (GoodsType goodsType in goodsTypes)
{
GameObject tableLine = NGUITools.AddChild(tradeListTable, tradeListTableLinePrefab);
tableLine.name = goodsType.name;
FillTableLine(tableLine, goodsType); // Updates the UILabel.text(s) on the line to display the goods' attributes
tableLine.GetComponent<UIPanel>().ResetAndUpdateAnchors();
}
tradeListTable.GetComponent<UITable>().Reposition();
}
I've attached a screenshot of the visual effect and prefabs of the table and the table lines. I feel like it's probably a one-line answer but I've not been able to find any solution in the other threads here. Any tips would be hugely appreciated

Edit:
Isn't it always the way, figured it out almost as soon as I asked for help! Problem was mainly with my anchors, the "Keep within panel" checkbox on the UITable script was also involved in some way, unchecking that helped with positioning. I've attached "fixed" prefabs in case anyone comes along looking for a solution to a similar problem in future.