1. SmartClient Version: v9.0p_2013-07-25/LGPL Development Only (built 2013-07-25)
2. IE 9.0.8112.16421
3. Non-server issue
5. No JavaScript error
I'm having trouble using setKeepInParentRect. I'm tring to limit a drag operation and running into two issues I could use some help with.
Issue 1: I'm actually trying to limit the reposition of the element being dragged to the control's parent's parent (this is essentially a reposition of an element within a stack of elements in a VLayout). So I'm passing in that control's rectangle. This works fine when the browser is on my first monitor, but I have 4 monitors. When the browser is full screen on my 4th monitor, the left position of the rectangle is not correct. It doesn't even help if I create the Rectangle object using the value of getAbsoluteLeft(). In both cases, the result returns the same left cooridate value (as if the browser was on the first display). However, when I pass this value into setKeepInParentRect, that method seems to want the actual absolute left position accounting for the other 3 monitors and is off by 1600*3 pixels in my case. If I make this adjustment by hard coding in the offest adjustment of 1600*3 everything works fine. How do I get the correct rectangle position information accounting for multiple monitors? Is this a defect in the setKeepInParentRect method?
Issue 2: When I hard code in the correct rectangle restriction, the "move" of the control is restricted as I would expect. However, I have a ListGrid on the display to the left of the restriction rectangle. This list grid has enough data that it is displaying a horizontal scrollbar. The rectangle restriction keeps the move of the control from moving over the grid, but the mouse can still move over the grid during the drag operation. When the mouse moves over the grid, the grid starts automatically horizontally scrolling to the left. How do I stop the grid from reacting to the mouse moving over it during a drag when the object being dragged cannot be moved over the grid?
2. IE 9.0.8112.16421
3. Non-server issue
5. No JavaScript error
I'm having trouble using setKeepInParentRect. I'm tring to limit a drag operation and running into two issues I could use some help with.
Issue 1: I'm actually trying to limit the reposition of the element being dragged to the control's parent's parent (this is essentially a reposition of an element within a stack of elements in a VLayout). So I'm passing in that control's rectangle. This works fine when the browser is on my first monitor, but I have 4 monitors. When the browser is full screen on my 4th monitor, the left position of the rectangle is not correct. It doesn't even help if I create the Rectangle object using the value of getAbsoluteLeft(). In both cases, the result returns the same left cooridate value (as if the browser was on the first display). However, when I pass this value into setKeepInParentRect, that method seems to want the actual absolute left position accounting for the other 3 monitors and is off by 1600*3 pixels in my case. If I make this adjustment by hard coding in the offest adjustment of 1600*3 everything works fine. How do I get the correct rectangle position information accounting for multiple monitors? Is this a defect in the setKeepInParentRect method?
Issue 2: When I hard code in the correct rectangle restriction, the "move" of the control is restricted as I would expect. However, I have a ListGrid on the display to the left of the restriction rectangle. This list grid has enough data that it is displaying a horizontal scrollbar. The rectangle restriction keeps the move of the control from moving over the grid, but the mouse can still move over the grid during the drag operation. When the mouse moves over the grid, the grid starts automatically horizontally scrolling to the left. How do I stop the grid from reacting to the mouse moving over it during a drag when the object being dragged cannot be moved over the grid?