OK. The problem is that you are not taking the host frame's insets into account. Try calling DesktopApplicationContext#sizeToFit() with your Pivot window as the argument. That should do what you want.
On Oct 20, 2010, at 9:18 AM, MSafiri wrote: > > Dear Greg, > > Here is what I tried to do: > > - I have a BoxPane with the size of 200 x 200 > - I used the code example (showed in the previous mail) to set the size of > the Host Frame > - If I set the HostFrame size to 200 x 200, the decoration created by the OS > (Win 7) cuts into the BoxPane. > > final java.awt.Frame hostFrame = > (java.awt.Frame)display.getDisplayHost().getParent(); > hostFrame.setSize(window.getPreferredWidth()+16, > window.getPreferredHeight()+37); > hostFrame.setResizable(true); > > I had to add the bold numbers in order to enlarge the host frame size to > display all controls properly. I am sure this is not the right way to do, > but have not found anything better. > > Cheers, > > MSafiri > -- > View this message in context: > http://apache-pivot-users.399431.n3.nabble.com/HostFrame-Size-How-to-calculate-tp1736915p1738661.html > Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
