pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wim Goeman <wimgoe...@gmail.com>
Subject Resizing host window to content
Date Wed, 11 May 2011 18:13:03 GMT
Hi,

I am developing a new application and decided to go for Apache Pivot for the
first time, so forgive me if my question is a bit dumb.

I decided to go with a window with a simple TabPane inside it as a start.
This looks pretty good, but I was hoping to have the window (as in operating
system window) automatically size to the required size for my content on
startup. Apart from that, when the user resizes that window, I would also
like to have the content resizing. I tried searching the javadocs and this
mailing list but could not come up with anything. Maybe someone with more
experience knows this?

This is what I currently have:

<Window title="Window title"
maximized="true" xmlns="org.apache.pivot.wtk" xmlns:bxml="
http://pivot.apache.org/bxml"
xmlns:content="org.apache.pivot.wtk.content">

<TabPane styles="{padding:4}">
  <BoxPane orientation="vertical" styles="{fill:true}">
    <TabPane.tabData>
      <content:ButtonData text="A tab" />
    </TabPane.tabData>
    <Border>
      <ScrollPane
horizontalScrollBarPolicy="fill" verticalScrollBarPolicy="fill_to_capacity"
preferredHeight="100">
        <TextArea text="lorem ipsum" />
      </ScrollPane>
    </Border>
    <FlowPane styles="{alignToBaseline:true, alignment:'right'}">
      <PushButton bxml:id="btnInstallUpdates" buttonData="Right button" />
    </FlowPane>
  </BoxPane>
</TabPane>

</Window>

Thanks!
Wim

Mime
View raw message