I think you misunderstood me
Keep your XML exactly as you had it on the previous page. Only change the parent in Lua code from EventExplorerWindowScroll to EventExplorerWindowScrollContents.
Originally Posted by zgrssd
Currently my XML looks like this:
xml Code:
<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> ...
|
The line marked with *** creates the scroll container you need, it inherits from ZO_ScrollList which contains all the components. And since it's so stupid to write about code we all have installed, here's how it's defined:
xml Code:
<!--Scroll List-->
<Control name="ZO_ScrollList" inherits="ZO_ScrollAreaBarBehavior" virtual="true">
<OnInitialized>
ZO_ScrollList_Initialize(self)
</OnInitialized>
<Controls>
<Scroll name="$(parent)Contents" mouseEnabled="true">
<Anchor point="TOPLEFT" />
<Anchor point="BOTTOMRIGHT" offsetX="-16" />
<OnMouseWheel>
ZO_ScrollList_ScrollRelative(self:GetParent(), -delta * 40)
</OnMouseWheel>
</Scroll>
<Slider name="$(parent)ScrollBar" mouseEnabled="true" inherits="ZO_VerticalScrollbarBase">
<Anchor point="TOPLEFT" relativeTo="$(parent)Contents" relativePoint="TOPRIGHT" offsetY="16" />
<Anchor point="BOTTOMLEFT" relativeTo="$(parent)Contents" relativePoint="BOTTOMRIGHT" offsetY="-16" />
<OnMouseWheel>
ZO_ScrollList_ScrollRelative(self:GetParent(), -delta * 40)
</OnMouseWheel>
<OnValueChanged>
ZO_ScrollList_MoveWindow(self:GetParent(), value)
</OnValueChanged>
</Slider>
</Controls>
</Control>
You see? By inheriting from ZO_ScrollList, you get a control which has a child named "Contents" where you put all the controls you want in the scrollable window. It's parent is your EventExplorerWindow->Scroll, thus the full name is EventExplorerWindowScrollContents.