Currently my XML looks like this:
xml Code:
<GuiXml>
<Controls>
<TopLevelControl name="EventExplorerWindow" mouseEnabled="true" movable="true" clampedToScreen="true" hidden="true" >
<Dimensions x="760" y="650" />
<Anchor point="CENTER" />
<Controls>
<Backdrop name="$(parent)BG" inherits="ZO_DefaultBackdrop" />
<Control name="$(parent)Scroll" inherits="ZO_ScrollList">
<Anchor point="TOPLEFT" offsetY="30" />
<Anchor point="BOTTOMRIGHT" />
</Control>
</Controls>
</TopLevelControl>
<Control name="EventExplorerRow" virtual="true">
<Dimensions y="25"/>
<Controls>
<Label name="$(parent)Id" font="ZoFontGame" horizontalAlignment="RIGHT" >
<Dimensions x="60"/>
<Anchor point="LEFT" />
</Label>
<Label name="$(parent)Name" font="ZoFontGame" >
<Anchor point="LEFT" relativeTo="$(parent)Id" relativePoint="RIGHT" offsetX="20"/>
</Label>
</Controls>
</Control>
</Controls>
</GuiXml>
with fill Window looking like:
Lua Code:
local function fillWindow()
for key, value in ipairs(Events) do
local row = CreateControlFromVirtual("$(parent)Row", EventExplorerWindowScroll, "EventExplorerRow", key)
if key == 1 then
row:SetAnchor(TOPLEFT, EventExplorerWindowScroll, TOPLEFT, 0, 0)
else
row:SetAnchor(TOP, lastRow, BOTTOM, 0, 0)
end
row:GetNamedChild("Id"):SetText(tostring(value.value))
row:GetNamedChild("Name"):SetText(value.key)
lastRow = row
end
end
Still not getting quite the results I expected, but at least I am hitting the right container element:
I would guess the Scroll Window is not properly aware that it's own Dimensions should bve confined to the Windows Dimensions. So it will automatically stretch to it's contents size instead of doing scroll panel stuff.