7 May 2013 12:39 AM #1
BorderLayout doesn't mind the margins
Hello, there is a little bug for der BorderLayoutExample (3.0.1):
If you hide an Region, it doesn't matter what Region, the margins aren't respected. The margins are 10px for the SimpleContainer. But if you hide an Region the margins are nearly 1px.
SimpleContainer simple = new SimpleContainer(); simple.add(con, new MarginData(10));
6 Jun 2013 11:03 PM #2
Ist this bug in your bugtrackers or not?
I have a general question. Why do Sencha let bugs report via forum and not a bug tracker system? Therefore everyone can look inside and easily see if a bug is accepted or not. I think this will be a great feature for everyone. So you don't have to search in the forum, what is really a pain and not state of the art!
7 Jun 2013 10:45 AM #3
You can easily see if a bug is accepted or not - it will say [OPEN] in the title and (for any bug filed in the last year or so) have an EXTGWT-XXX id associated with it at the top of the thread.
With the new/improved forum search, I would argue that the discussions here are more searchable than our internal tool - I use the forum search to get the bug ID (or past related IDs) before looking at the internal tracker. It isn't that the internal tool is bad, so much as there is more discussion held here to draw on, more code samples. We use the internal tool for planning, but post any workarounds found as much here as internally.
I'm seeing the margins respected *for the object added to the border layout container*. You are doing something different - you are setting a margin for the objected *added to* the child of the border layout container. When a child is collapsed (and you mean collapsed, not hidden, right?), the contents itself are gone and are replaced by a CollapsePanel, so any internal layout choices are also gone. It likewise wouldn't be reasonable to report that if I add a button to the child that I can't see that button any more when the region is collapsed.
In other words, do this:
BorderLayoutContainer blc; Widget child; BorderLayoutData data = new BorderLayoutData(); data.setMargins(new Margins(10)); blc.setWestWidget(child, data);
BorderLayoutContainer blc; //this modifies the thing that will not be visible, therefor will have no effect when collapsed/hidden SimpleContainer child; child.add(someOtherWidget, new MarginData(10)); BorderLayoutData data = new BorderLayoutData(); blc.setWestWidget(child, data);
10 Jun 2013 10:49 PM #4
Hi, Colin this was a misanderstanding.
I do nothing with the margins. I only want to say, that in your explorer demo the margins aren't respected if you hide an region. I made two pictures to clarify the behaviour.
In the first picture the BorderLayouContainer was added to the SimpleContainer with margins 10px around the blc. Everything looks fine.
In the second picture the north region was hidden. And now the margins aren't 10px anymore. If you show the north region again, everything looks fine.
I hope that my point is clear now. If you still have questions, i'm here!
11 Jun 2013 7:28 AM #5
Thanks, I understand now. Having a quick discussion internally to confirm that this is indeed a bug in 3 (and wasn't a bug in 2), since in all other cases, hidden containers don't show their margins. Remember too that you can set margins on the center region, which can't as easily be hidden.