PDA

View Full Version : Flex Issues



DrogoNevets
23 Dec 2009, 2:30 AM
Hi I have an issue with HBoxLayout and flex.

I don't really understand whats going on as I have it working perfectly everywhere else



private LayoutContainer getParamBoxPanel() {
LayoutContainer c = new LayoutContainer();
c.setHeight(100);
c.setLayout(new HBoxLayout());

FieldSet f = new FieldSet();
f.setHeading(GxtI18nUtils.getMessages().parameters());

HBoxLayoutData fLayoutData = new HBoxLayoutData();
fLayoutData.setFlex(1);
f.add(_parameterText);
c.add(f, fLayoutData);
_parameterText.addText("Some variable text (scrollable)");

HBoxLayoutData layoutData = new HBoxLayoutData();
layoutData.setFlex(2);

LayoutContainer container = new LayoutContainer();
container.addText("Some Long Text.");

c.add(container, layoutData);

return c;
}


That's the code thats not quite working, what I'm after is the "long text container" to take up 2/3's of the available width and the fieldset to take up 1/3

but the long text seems to be pushing everything to the left :(

can anyone suggest why and a work around?

Drogo