Hi All, es there a way to make sure that all mouse events go to my widget
when I call setCapture()? I'm working on a draggable divider and I'm
grabbing the mouse down, move and up events. It works well except when the
cursor moves outside the client area and I let up, I miss the mouse up event
and my widget gets stuck.
Here is my code, any suggestions?
Thanks
--Andy
window.application.main = function()
{
var d = this.getClientWindow().getClientDocument();
var divider = new QxVerticalBoxLayout;
with (divider)
{
setLocation(100, 0);
setHeight(400);
setWidth(12);
setSelectable(false);
setBackgroundColor("#ebe9ed");
setBorder(new QxBorderObject(1, "outset"));
divider.oldX = null;
addEventListener("mousedown", dividerDragDown, this);
addEventListener("mousemove", dividerDragMove, this);
addEventListener("mouseup", dividerDragUp, this);
}
function dividerDragDown(e)
{
divider.setCapture(true);
divider.oldX = e.getClientX();
};
function dividerDragMove(e)
{
if (divider.oldX != null)
{
divider.setLeft( (e.getClientX()).limit(1, 500) );
QxWidget.flushGlobalQueues();
}
else
{
divider.setCursor("w-resize");
}
}
function dividerDragUp(e)
{
divider.setCapture(false)
divider.oldX = null;
};
d.add(divider);
};
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel