pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill van Melle <bill.van.me...@gmail.com>
Subject Why can't I set a TabPane's buttonPadding to a dictionary?
Date Wed, 19 Oct 2011 04:16:09 GMT
I must be missing something really obvious here.  TablePane happily
accepts a padding value expressed as a dictionary.  So does Label.
But when the bxml serializer gets down to the TabPane below where I
try to set its buttonPadding to the same dictionary, it barfs, saying
"Unable to coerce org.apache.pivot.collections.HashMap to class
org.apache.pivot.wtk.Insets".  Aren't the padding values also of type
Insets?  What am I doing wrong?

<Window xmlns="org.apache.pivot.wtk">
  <TablePane styles="{padding:{left:10,right:10,top:5,bottom:5}}">
    <columns>
      <TablePane.Column width="1*" />
    </columns>
    <TablePane.Row>
      <Label text="Some text"
styles="{padding:{left:10,right:10,top:5,bottom:5}}" />
    </TablePane.Row>
    <TablePane.Row>
      <TabPane styles="{buttonPadding:{left:10,right:10,top:5,bottom:5}}" >
        <BoxPane TabPane.tabData="Test" />
      </TabPane>
    </TablePane.Row>
  </TablePane>
</Window>

Mime
View raw message