• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

GXT 3.0 and the com.sencha.gxt.widget.core.client.Window class - auto-sizing to fit?

Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so I'm starting to poke around in GXT.... I'm using 3.0 developer preview 5.

I'm trying to do some basic stuff with the Window class, and I'm sort of happy with it. But using it with a BorderLayoutContainer is a bit . . odd . .

If I take a Window and add a VerticalLayoutContainer to it, then when I show the Window,it sizes to being large enough to show all of the contents - very similar to what I'd expect from Swing's JFrame.pack() method.

If I take a Window and add a BorderLayoutContainer to it, add Widgets to the north, south, east, west and center, then show, well, the behavior is a bit weird. The window starts fairly small, and shows only the north area - if I drag out the bottom corner with the mouse to expand it, other elements show, but at first overlapping, then gradually spreading out as I widen the window enough to fit everything.

I don't want to explicitly set the size since for what I ultimately intend to do, the size required to show all the contents will vary. However, there doesn't appear to be a method similar to JFrame's "pack()" as far as I can tell.

Is there any way to get the window to auto-size to be large enough to fit all the contents without overlapping or hiding anything? I imagine that there will be other Layout Panel classes for which this occurs.. already my experimentation with HorizontalLayoutPanel is behaving oddly - at least, oddly relative to what I'd assume based on Swing-like behavior.

Here's the code, without the import declarations:
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also trying to use GXT from my eclipse plugin , can you tell how I ll configure I am using GWT 2.* .
Joe Vahabzadeh
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to just download it from the Sencha website for Developer Preview 5 (linked to from the Sencha Blog page), unzip it, follow the instructions in the setup.txt, and it worked.

However, I have never had GXT 2.x, so I don't know if there are extra steps when upgrading from 2.x to 3.0.

Also, in the setup.txt, the following line is wrong:
<link rel="stylesheet" type="text/css" href="{module name}/css/reset.css" />

It should read:
<link rel="stylesheet" type="text/css" href="{module name}/reset.css" />

(this may have already been fixed, but it was wrong when I downloaded it.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic