GXT designer with nested containers and FitData

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

GXT designer with nested containers and FitData

Postby gaspo » Mon Feb 01, 2010 10:17 pm

When I create a dialog box with content panel offset by FitData then it is impossible to get widgets to align properly.

In example below, select both widgets and then click toolbar button "Align Vertical Centers". Widgets won't align.
When I set FitData to 0 then they align.

I'm using the latest GWT designer. Same behavior under Windows and Linux.

Code: Select all
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.Text;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.AbsoluteData;
import com.extjs.gxt.ui.client.widget.layout.AbsoluteLayout;
import com.extjs.gxt.ui.client.widget.layout.FitData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;

public class TestDlg extends Dialog
{
  private final ContentPanel contentPanel = new ContentPanel();
  private final Text text = new Text("New Text");
  private final TextField textField = new TextField();

  public TestDlg()
  {
    setModal(true);
    setHeading("New Dialog");
    setLayout(new FitLayout());

    contentPanel.setHeaderVisible(false);
    contentPanel.setFrame(true);
    contentPanel.setHeading("New ContentPanel");
    contentPanel.setCollapsible(true);
    contentPanel.setLayout(new AbsoluteLayout());
    add(contentPanel, new FitData(10));

    contentPanel.add(text, new AbsoluteData(67, 101));

    textField.setFieldLabel("New TextField");
    contentPanel.add(textField, new AbsoluteData(130, 129));
   
  }
}
gaspo
 
Posts: 21
Joined: Thu Oct 08, 2009 11:28 pm

Re: GXT designer with nested containers and FitData

Postby Eric Clayberg » Thu Feb 04, 2010 8:33 am

Update to the latest GWT Designer v7.3 build and try it again.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GXT designer with nested containers and FitData

Postby gaspo » Fri Feb 05, 2010 3:15 am

I have tested the latest version and it is working as expected.
Thank you.
gaspo
 
Posts: 21
Joined: Thu Oct 08, 2009 11:28 pm

Re: GXT designer with nested containers and FitData

Postby Eric Clayberg » Fri Feb 05, 2010 5:49 am

Glad that worked for you.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest