Ui XML Reference\ScrollContent

The scrollable content frame. Automatically created by creating a CreateHScrollFrame(), CreateVScrollFrame(), or CreateScrollFrame() in lua. When creating the scroll elements in xml, the explicit declaration of this frame is only necessary to set the padding and spacing for the child frames.

Note that spacing only works in legacy layouts. If you wanted to achieve a similar effect in a flex layout, you would have to adjust the children. See FlexLayouts/Margins.

Example Usage

<!-- Flex version -->
<VScroll layout="flex" height="200" width="120" frameImage="frame01_blue">
    <ScrollContent padding="10">
        <Frame height="100" width="100" frameImage="cart" marginBottom="10" />
        <Frame height="100" width="100" frameImage="cart" marginBottom="10" />
        <Frame height="100" width="100" frameImage="cart" marginBottom="10" />
        <Frame height="100" width="100" frameImage="cart" />
    </ScrollContent>
</VScroll>

<!-- Legacy version -->
<VScroll layout="legacy" height="200" width="120" frameImage="frame01_blue">
    <ScrollContent spacing="10" padding="10">
        <Frame height="100" width="100" frameImage="cart" />
        <Frame height="100" width="100" frameImage="cart" />
        <Frame height="100" width="100" frameImage="cart" />
        <Frame height="100" width="100" frameImage="cart" />
    </ScrollContent>
</VScroll>

This XML produces the following UI:
image