Results 1 to 3 of 3

Thread: TabPanel Problem

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Feb 2010

    Default TabPanel Problem


    I have a widget with a toolbar, a grid and a pagingtoolbard. When I use this widget in a window all is OK but when i put this widget in a tabpanel (but not in the first tab) the widget in not correctly draw (see the attachment).
    When i move the mouse the toolbar and the gris appears correctly without the pagingtoolbar and why I maximize the window all the widget (toolbar, grid and pagingtoolbar) is correctly draw.

    An idea ? Thanks in advance,


    A part of the widget's code
    VerticalLayoutContainer con = new VerticalLayoutContainer();
    con.add(t, new VerticalLayoutData(1,-1));con.add(grid, new VerticalLayoutData(1,1));
    con.add(pagToolBar, new VerticalLayoutData(1,-1));
    Img 1 : on load

    Img 2 : when I move the mouse
    Img 3 : when I maximize and restore the window

  2. #2
    Sencha User
    Join Date
    Jul 2011

    Default Found Bug in CardLayoutContainer

    I had a similar issue: forceLayout() on children of TabPanel was a noop, since isOrWasLayoutRunning() of parent returned false.
    Hier my bug report:

    Version(s) of Ext GWT
    Ext GWT 3.0.0b

    Browser versions and OS
    (and desktop environment, if applicable)
    Chrome and FF26.0 on Win7 64bit

    Virtual Machine

    Layout broken on TabPanel. Initially chosen TabPanel is not affected.

    Run mode

    Steps to reproduce the problem

    1. TabPanel with at least 2 tabs
    2. Click a Tab
    3. Check hadLayoutRunning of CardLayoutContainer by debugging

    Expected result
    Should be true, since this Tab is displayed and Layout had to be run.

    Actual result
    Is false, since only doLayout() has been called and not forceLayout().

    Debugging already done
    public class CardLayoutContainer extends InsertResizeContainer implements HasActiveWidget {
      public void setActiveWidget(Widget widget) {
        if (activeWidget == widget) {
        if (activeWidget != null) {
        if (widget != null) {
          if (widget.asWidget().getParent() == this) {
            activeWidget = widget;
            // forcing causes layout to execute every time this method called
            // when used with TabPanel this causes layouts to execute every time tab
            // selected which is not optimal
            // EXTGWT-1550, in example, a panel is collapsed then another tab is
            // selected. when returning to tab with collapsed panel
            // the layout executes as it was forced
            // layoutRequiredThisEventLoop = true;
            // forceLayout();
            if (GXT.isIE6() || GXT.isIE7()) {
              layoutRequiredThisEventLoop = true;
            } else {
          } else {
    Calling doLayout() instead of forceLayout() seems to be a bad idea:
    - doLayout() runs layout right away. This is usesless, if item is not attached/shown etc. forceLayout checks such things before eventually calling doLayout() itself!
    - forceLayout() eventually calls forceLayout() for children, doLayout() doesn't.
    - most important: forceLayout sets eventually hadLayoutRunning = true; doLayout() doesn't.

    Possible fix
    Obviously forceLayout() shall be called instead of doLayout().

  3. #3
    Sencha User
    Join Date
    Feb 2009


    GXT 3.0.0b is very old, 3.0.1 is the latest public, but this CardLayoutContainer bug was fixed in 3.0.3 as part of (and the related discussion These fixes will be made public in the upcoming 3.1 release, or you can get them now from support releases.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts