Bug #5945
openWBoxLayout - WPieChart resizing does not work when nested into a WContainerWidget
0%
Description
Hi,
the WPieChart resizing does work when it's added directly to the WBoxLayout only.
Please see the file attached (and comment #define HAPPY_RESIZING to see the difference).
I'm sure you can fix that.
Daniel
Files
Updated by Daniel Lier over 7 years ago
In addition to the described problem above, the '->findWidget("object_name");' method does not find the object when it's located into the W (Box)Layout.
Updated by Wim Dumon over 7 years ago
Hey Daniel,
Wouldn't you have to instantiate an additional layout manager when adding an additional layer of containers? That is, if you expect it to behave identically. A layout manager only manages the size of the children of a widget, wheras the pie chart is now a child of a child.
BR,
wim.
Updated by Daniel Lier over 7 years ago
Note: plese ignore the last comment regarding '->findObject' it works as expected
Updated by Daniel Lier over 7 years ago
Hi Wim,
Wouldn't you have to instantiate an additional layout manager when adding an additional layer of containers? That is, if you expect it to behave identically. A layout manager only manages the size of the children of a widget, wheras the pie chart is now a child of a child.
Yes, I would add a layout manager for any additional WContainerWidget if needed. That's exactly what I'm after. It would look like that:
1. root() <- that's a WContainerWidget
1.1. layout manager
1.1.1. container
1.1.1.1. layoutmanager
1.1.1.1.1 container / widgets
1.1.2. container
1.1.2.1. layoutmanager
1.1.2.1.1 container / widgets
My first layout manager is a WBoxLayout and the resizing mechanism does resize the container.
And as for other HTML it should then resize the containing objects as well.
Daniel