mh637
02-14-2005, 05:36 AM
In the following example, I want to set view width to values contained in the data set.
However, this seems to break the horizontal simplelayout.
Any help appreciated.
Thanks a lot!
<canvas height="250" width="600">
<dataset name="data">
<d attr="10"/>
<d attr="20"/>
</dataset>
<class name="myclass" extends="view">
<view height="20" bgcolor="black" width="$path{'@attr'}"/>
</class>
<simplelayout axis="y" spacing="15"/>
<myclass datapath="data:/d"/> <!-- this works -->
<view bgcolor="red">
<simplelayout axis="x" spacing="15"/>
<myclass datapath="data:/d"/> <!-- here, the layout does not work -->
</view>
</canvas>
However, this seems to break the horizontal simplelayout.
Any help appreciated.
Thanks a lot!
<canvas height="250" width="600">
<dataset name="data">
<d attr="10"/>
<d attr="20"/>
</dataset>
<class name="myclass" extends="view">
<view height="20" bgcolor="black" width="$path{'@attr'}"/>
</class>
<simplelayout axis="y" spacing="15"/>
<myclass datapath="data:/d"/> <!-- this works -->
<view bgcolor="red">
<simplelayout axis="x" spacing="15"/>
<myclass datapath="data:/d"/> <!-- here, the layout does not work -->
</view>
</canvas>