Sorry for the traffic, but I've found one of the solution I've proposed
wasn't 100% right.
[...]
1) Placing a QxComboBox inside a scrollable parent widget causes the popup
from the QxComboBox to appear in a wrong position: it doesn't consider the
scroll position of the parent widget.
[...]
With my old code the parent widget's scroll is considered, but not the
scroll from all the ancestors of the QxComboBox. Using a _openPopup function
like the following should fix the problem:
proto._openPopup=function(){
var p=this._popup;
var el=this.getElement();
if(!p.isCreated())
{
this.createDispatchEvent("beforeInitialOpen");
};
if(this._list.getChildrenLength()==0)
{
return;
};
var totalScrollLeft = 0;
var totalScrollTop = 0
var tmpWidget = this;
while (tmpWidget.getParent())
{
totalScrollLeft += tmpWidget.getParent().getScrollLeft();
totalScrollTop += tmpWidget.getParent().getScrollTop();
tmpWidget = tmpWidget.getParent();
}
p.setLeft(QxDom.getComputedPageBoxLeft(el)+1 - totalScrollLeft);
p.setTop(QxDom.getComputedPageBoxTop(el)+QxDom.getComputedBoxHeight(el) -
totalScrollTop);
p.setWidth(this.getBoxWidth()-2);
p.setParent(this.getTopLevelWidget());
p.show();
this._oldSelected=this.getSelected();
this.setCapture(true);
};
Sorry again for the double mail.
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel