I'm trying to make a scrollable inventory grid. I have a GridContainer inside a ScrollContainer:

When the popup emits abouttoshow(), I call fill_grid():
func fill_grid():
# Clear existing items from the grid.
while inventory_grid.get_child_count() > 0:
inventory_grid.remove_child(inventory_grid.get_child(0))
for i in range(0, character.inventory.size()):
var inventory_grid_item = preload("res://gui/InventoryGridItem.tscn").instance()
inventory_grid.add_child(inventory_grid_item)
There I add a bunch of InventoryGridItem instances. InventoryGridItem is just a TextureRect set to the Godot logo texture.
I verified that the for loop is entered and the InventoryGridItem instances are being added to the grid, but they don't show in the GridContainer. I know I'm doing something wrong, but the documentation for adding nodes to a GridContainer is non-existent...
So, what do I need to do to get the items to show up?