jedimaster
08-01-2003, 04:49 AM
I'm following the Understanding Views doc, and I'm at the point where I have my button bar gray, valigned, etc. One little thing I noticed. In the screen shots, the left most button is spaced 5 pixels away from the left side. When I display it though, the first button is immidiately aligned to the left border.
This is the code being used:
<canvas>
<include href="redmond/" />
<window x="20" y="20" width="200" height="250"
title="Boring Window" resizable="true">
<simplelayout axis="y" spacing="10" />
<view bgcolor="#bdbdbd"
width="parent.width"
height="this.buttons.refButton.height + 8">
<view name="buttons" valign="middle">
<simplelayout axis="x" spacing="5" />
<button name="refButton">1</button>
<button>2</button>
<button>3</button>
</view>
</view>
<text>Here is some text.</text>
<text>I could ramble for hours.</text>
<button x="(immediateparent.width / 2) - (this.width / 2)"
onclick="this.setAttribute('width', this.getAttribute('width') + 10);">
My Butt
</button>
</window>
</canvas>
This is the code being used:
<canvas>
<include href="redmond/" />
<window x="20" y="20" width="200" height="250"
title="Boring Window" resizable="true">
<simplelayout axis="y" spacing="10" />
<view bgcolor="#bdbdbd"
width="parent.width"
height="this.buttons.refButton.height + 8">
<view name="buttons" valign="middle">
<simplelayout axis="x" spacing="5" />
<button name="refButton">1</button>
<button>2</button>
<button>3</button>
</view>
</view>
<text>Here is some text.</text>
<text>I could ramble for hours.</text>
<button x="(immediateparent.width / 2) - (this.width / 2)"
onclick="this.setAttribute('width', this.getAttribute('width') + 10);">
My Butt
</button>
</window>
</canvas>