Hello, Sebastian
I've fixed that bug. My mistake was that I didn't implement 2 methods of the
*Impl class: computeChildBoxWidth and computeChildBoxHeight. Now I made them
and all seems to be OK.
A couple of words about my layout. It is pretty much like DockLayout (i.e. it
does need to manually inform the children about their dimension/location). It
is not allowed for children to define any dimension/location properties (like
DockLayout does on add() method). So it seems to me that I did it right. But
if you think that their could be some problems with my implementation please
let me know.
Thanks,
Alexei Golovko
> the current layout system have some problems which will be improved
> with qooxdoo 0.8. Please take a look to our roadmap.
>
> Until then please take a look at the BoxLayout implementations. These
> are the most complete renderer implementations currently available.
> Normally you don't need to manually inform the children. You just
> need to tell them if a change of the parent widget have effects on
> them. Please take a deeper look into updateChildOnInnerWidth/
> HeightChange. Hope this helps.
>
> Grretings,
> Sebastian
>
> Am 12.02.2007 um 10:05 schrieb [EMAIL PROTECTED]:
> > Hello,
> >
> > I'm developing my custom layout (mentioned previously in this
> > list). I've been
> > studing the code of qooxdoo layouts for a while, then created my
> > own. It
> > works OK when children are simple widgets.
> > But it fails when the child is layout (for example CanvasLayout).
> > I.e. it
> > doesn't force the child layout update. What should I call in *Impl
> > to force
> > child update?
> >
> > The main thing what I'm doing there is _apply* methods? Is there
> > any other
> > method (to call or implement) which will fix that?
> >
> > Here is what my *Impl class looks like:
> >
> > qx.Proto.updateChildOnInnerWidthChange = function(vChild)
> > {
> > vChild.addToLayoutChanges("location");
> >
> > return true;
> > }
> >
> > qx.Proto.layoutChild = function(vChild, vJobs) {
> > var widget = this.getWidget();
> > var width = widget.getInnerWidth();
> > if(width != this._prevWidth) {
> > widget._recomputeColumnWidth();
> > widget._recomputeColumns();
> > this._prevWidth = width;
> > }
> >
> > var config = widget._config[vChild._placeId];
> > var columns = widget._columns;
> > var isLabel = vChild instanceof qx.ui.basic.Label;
> > if(isLabel) {
> > var column = columns[config.startCol + '_'];
> > vChild._applyRuntimeLeft(column.left + column.width -
> > config._labelWidth);
> > vChild._applyRuntimeTop(config.top);
> > }
> > else {
> > var startCol = columns[config.startCol];
> > var endCol = columns[config.endCol];
> >
> > vChild._applyRuntimeLeft(startCol.left);
> > vChild._applyRuntimeWidth(endCol.start[config.startCol]);
> > vChild._applyRuntimeTop(config.top);
> > vChild._applyRuntimeHeight(config.height);
> > }
> > }
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel