PDA

View Full Version : Using stableborderlayout


antun
06-30-2004, 04:06 PM
You can use stableborderlayout to have two views maintain their widths while a central view stretches to fill the space:


<canvas>
<view width="300" height="200" id="widebox">
<stableborderlayout axis="x" />

<view width="10" height="${parent.height}" bgcolor="red" />

<view height="${parent.height}" bgcolor="blue" />

<view width="10" height="${parent.height}" bgcolor="red" />
</view>

<button y="220">Make wider
<method event="onclick">
widebox.setWidth( widebox.width + 5 );
</method>
</button>
</canvas>


Enjoy!