You can specify the padding values separately for each direction:
styles="{padding:{right:12}}" and that should fix it without having to
use the extra BoxPane (which doesn't work anyway because BoxPane sizes
itself to its content...).

Let us know.  Thanks for using Pivot.  No problem for the questions (I
was there not that long ago ;)

~Roger Whitcomb

-----Original Message-----
From: B.L. Zeebub [mailto:[email protected]] 
Sent: Wednesday, May 09, 2012 11:27 PM
To: [email protected]
Subject: Re: Alignment



> I would wrap the BoxPane inside a TablePane with two columns, the
first 
> of width "-1" and second with width "1*", then take the PushButton out

> of this BoxPane and make a second BoxPane (the second column of the 
> TablePane.Row) and put the PushButton inside that and set the
alignment 
> of this BoxPane to horizontal right, vertical center.  Something like 
> this (though I haven't tried it to be sure):
> <TablePane>
> <columns>
> <TablePane.Column width="-1"/>
> <TablePane.Column width="1*"/>
> </columns>
> <rows>
> <TablePane.Row>
> <BoxPane orientation="horizontal">
> <ImageView .../>
> <ImageView .../>
> ...
> <ImageView .../>
> </BoxPane>
> <BoxPane orientation="horizontal"
styles="{horizontalAlignment:'right', 
> verticalAlignment:'center'}">
> <PushButton wtkx:id="start" ... />
> </BoxPane>
> </TablePane.Row>
> </rows>
> </TablePane>
> 
> 

Thanks, that worked a treat. The only problem I've got now is that the
PushButton is now pushed hard up against the right hand edge of the
window.
I tried adding a padding style which moves the button away from the
edge,
but Pivot is applying the padding to the top and bottom as well which
increases the height of the row container. The CSS style padding-left
causes
an exception.

I then tried adding another BoxPane specifying a width style attribute
with
no content to act as a spacer but that doesn't work and still leaves the
button hard up against the edge of the screen.

Sorry for these newbie questions but could someone tell me how to move
the
BoxPane away from the right hand edge of the display without increasing
the
overall height of the containing row.

<TablePane>
                                        <columns>
                                        <TablePane.Column width="-1"/>
                                        <TablePane.Column width="1*"/>
                                        </columns>
                                        <rows>
                                        <TablePane.Row>
                                        <BoxPane
orientation="horizontal"  styles="{horizontalAlignment:'left',
padding:10}">
                                        <ImageView wtkx:id="car"
styles="{verticalAlignment:'center'}"/>
                                        <ImageView wtkx:id="vci_status"
styles="{verticalAlignment:'bottom'}"/>
                                        <ImageView wtkx:id="pc"
styles="{verticalAlignment:'center'}"/>
                                        <ImageView wtkx:id="pc_status"
styles="{verticalAlignment:'bottom'}"/>
                                        <ImageView wtkx:id="server"
styles="{verticalAlignment:'center'}"/>
                                        </BoxPane>
                                        
                                        <BoxPane
orientation="horizontal"
styles="{horizontalAlignment:'right',verticalAlignment:'center'}">
                                        
                                        <PushButton wtkx:id="start"
buttonData="Start Communications"
styles="{font:{bold:true, size:12} }"/>
                                        
                                        </BoxPane>
                                        <BoxPane
orientation="horizontal"
styles="{horizontalAlignment:'right',verticalAlignment:'center'}
width=10">
                                        </BoxPane>
                                        </TablePane.Row>
                                        </rows>
                                        </TablePane>


--
View this message in context:
http://apache-pivot-users.399431.n3.nabble.com/Alignment-tp3973763p39762
50.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Reply via email to