If you press the mouse button outside the canvas then move into the canvas area mouse enter and leave are reported with mouse down, If you press the mouse button when on the canvas mouse leave is not reported untill you release the mouse button!
PB5.42 windows 7.0
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave wrote:If you press the mouse button outside the canvas then move into the canvas area mouse enter and leave are reported with mouse down, If you press the mouse button when on the canvas mouse leave is not reported untill you release the mouse button!
This is by design. It simplifies writing mouse tracking code.
If you press & hold the mouse button inside the gadget, you receive mouse move events even from outside of the own gadget until the button is released (the mouse is "captured"). You can think of it as the gadget having infinite size while you hold the mouse button. This allows implementing dragging/scrolling in an intuitive way. So in a sense, the mouse does not "leave" the gadget until the button is released. This is why the release event is delayed as well to have a logical order of events independent of where the button is released (inside or outside of the gadget).
That's correct behavior imho. Anything else would be counterintuitive and pretty much nonstandard for an OS control (which this isn't but one of its best uses is to make custom controls).