Closed GoogleCodeExporter closed 9 years ago
I looked at the source code, and saw, that this function returns a Rectangle
with the
width and height of the container, but not the Position. So this function is a
partly
working version of getDimension and therefore not described one.
Original comment by ma.kalbf...@googlemail.com
on 15 Sep 2008 at 7:51
It does what it is suppose to do. BasicContainer::getChildrenArea should return
an
area relative to the BasicContainer, hence a rectangle with position (0,0) and
height
and with of the BasicContainer is the whole BasicContainer.
If the rectangles parameters are all zero then your container has zero size.
I looked at your code and this line:
this->setDimension( this->getChildrenArea () );
doesn't do anything as getChildrenArea relies on getDimension, so you are
basically
setting the dimension to zero size. BasicContainer::getChildrenArea is NOT the
same
thing as computing the area of all widgets inside the container. Why? Because
the
method is used when drawing children of a BasicContainer. Take the ScrollArea
as an
example, it's children area is the area where you can view the ScrollArea's
content
and that area is computed and set by the ScrollArea. BasicContainer retrieves
the
area by calling getChildrenArea which ScrollArea overloads. Perhaps the docs
should
be enhanced.
Original comment by olof.nae...@gmail.com
on 15 Sep 2008 at 9:39
Original issue reported on code.google.com by
ma.kalbf...@googlemail.com
on 15 Sep 2008 at 7:01Attachments: