Hello Cajus,
since you can only work with the public or protected methods of Pane,
the possibilites to add code are very limited. I have tried many
solutions and this is the only one that I would not call a hack:
First, overwrite the constructor and add a move listener to the
splitter:
construct : function(orientation)
{
this.base(arguments, orientation);
var splitter = this.getChildControl("splitter");
splitter.addListenerOnce("appear", function(){
splitter.addListener("move", this._onSplitterMove, this)
}, this)
}
Every time the splitter is moved, you can get the bounds of children
inside the Pane and fire the resized event.
_onSplitterMove : function(e)
{
var children = this._getChildren();
var firstWidget = children[2];
var secondWidget = children[3];
var eventData, firstSize, secondSize;
if (this.getOrientation() == "horizontal")
{
firstSize = firstWidget.getBounds() ?
firstWidget.getBounds().width : 0;
secondSize = secondWidget.getBounds() ?
secondWidget.getBounds().width : 0;
}
else
{
firstSize = firstWidget.getBounds() ?
firstWidget.getBounds().height : 0;
secondSize = secondWidget.getBounds() ?
secondWidget.getBounds().height : 0;
}
eventData = {
beginSize : firstSize,
endSize : secondSize
};
this.fireDataEvent("resized", eventData);
}
Please let me know if this solution is working for you. ;-)
Cheers,
Jonathan
On 19.03.2009, at 16:27, Cajus Pollmeier wrote:
> Hi Jonathan,
>
> sadly I need to get the width of the first and the second container
> - or the splitbar position. So I've to take over the complete class
> and modify it, or are there better ways?
>
> Greetings,
> Cajus
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel