jpwrunyan
09-15-2005, 12:44 AM
Hello,
I am having trouble getting the scroll bar layout that I want. I have a horizontally scrollable table (like a grid) with a header and then fields underneath it. If the user scrolls horizontally, then the header and the fields both scroll left/right. But then there is also a vertical scroll for the rows underneath the header. I cannot figure out how to get this layout to work. The closest I have come is posted at the bottom.
I know why my current layout doesn't work, but like I said, I don't know how to get what I want. if you run the code I am sure you will realize immediately what I am trying to do as well as why my current code isn't working.
<?xml version="1.0" encoding="UTF-8" ?>
<canvas width="600" height="250">
<class name="HScrollView" defaultplacement="content" clip="true">
<view x="0" y="0" name="content">
</view>
<scrollbar id="sbx" axis="x" />
</class>
<class name="VScrollView" defaultplacement="content" clip="true">
<view x="0" y="0" name="content">
</view>
<scrollbar id="sby" />
</class>
<view x="50" y="10" width="500" height="200" bgcolor="0x999999">
<HScrollView bgcolor="0xFFFFAF" x="1" y="1" width="${parent.width-2}" height="${parent.height-2}">
<view name="header" x="1" y="1" height="20" bgcolor="0xFFFFDD">
<text>Header----------------------------------------------------------------------------------------------------------very long</text>
</view>
<VScrollView bgcolor="0xFFFFAF" x="1" y="${parent.header.height+1}" width="${parent.width}" height="${parent.height-parent.header.height-2-sbx.height}">
<simplelayout axis="y" spacing="5" />
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf ================================================== ================================================== ==================very long</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
</VScrollView>
</HScrollView>
</view>
</canvas>
I am having trouble getting the scroll bar layout that I want. I have a horizontally scrollable table (like a grid) with a header and then fields underneath it. If the user scrolls horizontally, then the header and the fields both scroll left/right. But then there is also a vertical scroll for the rows underneath the header. I cannot figure out how to get this layout to work. The closest I have come is posted at the bottom.
I know why my current layout doesn't work, but like I said, I don't know how to get what I want. if you run the code I am sure you will realize immediately what I am trying to do as well as why my current code isn't working.
<?xml version="1.0" encoding="UTF-8" ?>
<canvas width="600" height="250">
<class name="HScrollView" defaultplacement="content" clip="true">
<view x="0" y="0" name="content">
</view>
<scrollbar id="sbx" axis="x" />
</class>
<class name="VScrollView" defaultplacement="content" clip="true">
<view x="0" y="0" name="content">
</view>
<scrollbar id="sby" />
</class>
<view x="50" y="10" width="500" height="200" bgcolor="0x999999">
<HScrollView bgcolor="0xFFFFAF" x="1" y="1" width="${parent.width-2}" height="${parent.height-2}">
<view name="header" x="1" y="1" height="20" bgcolor="0xFFFFDD">
<text>Header----------------------------------------------------------------------------------------------------------very long</text>
</view>
<VScrollView bgcolor="0xFFFFAF" x="1" y="${parent.header.height+1}" width="${parent.width}" height="${parent.height-parent.header.height-2-sbx.height}">
<simplelayout axis="y" spacing="5" />
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf ================================================== ================================================== ==================very long</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
<text>asdf</text>
</VScrollView>
</HScrollView>
</view>
</canvas>