I'm guessing you are trying to set the size of the DesktopApplicationContext window? That is actually a container for your window(s). When you call setMaximized() on your window, it is maximized within this window.

You can control the size of DesktopApplicationContext by passing width and height command-line arguments to it. You can pass them either like this:

width:1024 height:768

or like this:

--width=1024 --height=768

There is currently no way to open DesktopApplicationContext maximized, but you can open it in full screen mode by passing fullScreen:true or --fullScreen=true.

As for layout, it sounds like what you need is a TablePane. You can specify that a column or row be given a percentage of the available space. Unfortunately, there isn't a tutorial for this component yet, but you can see examples of its use throughout the demos and other tutorials. Column widths can be specified as follows, and row heights are similar:

width="n*" - take up n units of the available space. If you only have one relatively sized column, "1*" means take up 100% of the available space. If you have 2 or more, the percentage is determined as n divided by the sum of all n values.

width="n" - take up exactly n pixels in width

width="-1" - take up only the preferred width of the column

Hope this helps. Also, I'd suggest subscribing to pivot-user - it is a great place to post questions like this. I have cc'ed it here.

Greg


On Jun 7, 2009, at 3:02 PM, Werner Liebenberg wrote:

Hi Greg!

I am developing a Pivot application for a standalone application using the version 1.2 code currently in SVN. I am trying to make my main application window start up maximized, and I want all the components of the window to resize equally, to fill 100% of the space permitted to them. Is there a "setPreferredWidthPercentage()" method or something similar I can use for components, to size them such that they automatically take up all the space available to them? Also, why does window.setMaximized(true) appear to have zero effect? I call it before I call window.open(display), but the window alway starts up with an arbitrary size.

Werner Liebenberg


Reply via email to