Results 1 to 7 of 7

Thread: GXT4: HideMode.OFFSETS - not taking Margins into account?

    You found a bug! We've classified it as EXTGWT-4961 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    38

    Default GXT4: HideMode.OFFSETS - not taking Margins into account?

    Hi there,

    I've been migrating an app from GXT 3.0.6 to GXT 4.0.1 (GWT 2.5->GWT2.8b1 as well). One of our pages uses a combination of tabs (TabPanel), VerticalLayoutContainers, FieldSets, and FieldLabels with mixed in data entry widgets (String input fields, etc).

    This worked just fine under GXT 3 but moving to GXT 4 I found the layouts of the data widgets to be fairly off and a horizontal scrollbar where there was none before. After re-checking all the widgets to have HideMode.OFFSETS enabled as well as checking if any of our Appearances might be affecting this, I disabled the Margins around the various widgets I'm adding to space them out a bit. Doing so made the page render how I might expect... while I would prefer to have the spacing provided by the Margins, it seems to just not work correctly with HideMode.OFFSETS in GXT4.

    Is this a bug, a change, or maybe a change in convention in GXT 4 I was not aware of? Any insight here would be helpful.

    Thanks.

  2. #2
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,165

    Default

    This smells like a bug. Although I suspect it's with how the programmatic sizing containers are behaving. In some cases where no layout data is given, like using -1, -1 for a VLC could cause issues down stream. If I could see more of the code configuration I could provide more options. May I see some of the code?

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    38

    Default

    Not sure how much code you'd really need... basically the following block is what I ended up changing to get it to lay out correctly:

    Code:
    VerticalLayoutContainer vlc = (VerticalLayoutContainer)parent;
    VerticalLayoutData vlData = new VerticalLayoutData();
      // Issue: https://www.sencha.com/forum/showthread.php?310993-GXT4-HideMode.OFFSETS-not-taking-Margins-into-account&p=1135547#post1135547
    //vlData.setMargins(new Margins(getMarginWidth())); 
    vlc.add(child, vlData);
    So I was just adding margins in GXT3 (which worked) but as you can see I've removed them for GXT 4 to get the layout looking "correct" (sans margins).

    In particularly, a VLC inside a FieldSet was not being rendered correctly, the inner widgets within the VLC were not displayed in the FieldSet, they were cut off at the bottom. Removing the margins as above fixes the issue.

  4. #4
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    38

    Default

    Is this considered a bug or is more information needed?

  5. #5
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,165

    Default

    We did tune the VLC layout in 3.x minor release and it did change some of the layouts. It sounds like you're seeing a difference b/c of that patch. From the sounds of it you have a workaround too. There isn't much I can do now because of the change except ask for a test case which I could use to submit to engineering. Or if you need help finding a way around something I can help look at that more. Nice job with providing details and working around the issue too.

  6. #6
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    38

    Default

    My workaround was to turn off all Margins... which obviously has no effect on utility, however if my designer comes back to me and asks me to put them back, I literally can't, due to what I consider a GXT bug at this point. I'd at least like to see a bug filed on the issue.

  7. #7
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,165

    Default

    Good point, I've filed the issue with engineering. Thanks for reporting.

Similar Threads

  1. form hideMode offsets || offset
    By loumac in forum Ext: Discussion
    Replies: 1
    Last Post: 13 May 2013, 12:03 PM
  2. hideMode: 'offsets' not working
    By ben.gillis in forum Ext: Q&A
    Replies: 0
    Last Post: 9 Apr 2012, 7:15 AM
  3. hideMode: 'offsets' causing problems in IE
    By forumuser1080 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 5 Jul 2011, 12:34 PM
  4. TabPanel with hideMode:'offsets'
    By srajakaruna in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 21 May 2009, 3:32 AM
  5. hideMode 'offsets' HtmlEditor
    By Tobsen in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 9 Apr 2008, 1:08 AM

Posting Permissions

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