Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Mouse up/down |
Wed, Feb 8 2017 10:47 AM | Permanent Link |
Matthew Jones | I am trying to get a drag system working, and using MouseDown and MouseUp events. The mouse down works, and mouse up works if I keep it within the same embedded form. But if I move out of the current form and to another form (same type), the mouse up event is lost. I only get it when I click again for a new MouseDown and up again.
I wonder if this is some sort of mouse capture interfering. But that normally has the event go back to the original down location. Anyone know anything about this? Or possible changes about to be available? -- Matthew Jones |
Wed, Feb 8 2017 2:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< I am trying to get a drag system working, and using MouseDown and MouseUp events. The mouse down works, and mouse up works if I keep it within the same embedded form. But if I move out of the current form and to another form (same type), the mouse up event is lost. I only get it when I click again for a new MouseDown and up again. I wonder if this is some sort of mouse capture interfering. But that normally has the event go back to the original down location. Anyone know anything about this? Or possible changes about to be available? >> You're using the wrong methods/events. What you want are these TControl methods (protected): function DoCaptureStart(Button: Integer; ShiftKey, CtrlKey, AltKey: Boolean; X,Y: Integer): Boolean; virtual; procedure DoCapturing(X,Y: Integer); virtual; procedure DoCaptureEnd(X,Y: Integer); virtual; Overriding these methods will allow you to capture the mouse events within the control so that you can handle dragging. Check out the TCaptionBarControl control in the WebCtnrs unit for more information on how this is done. Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 10 2017 9:26 AM | Permanent Link |
Matthew Jones | Tim Young [Elevate Software] wrote:
> You're using the wrong methods/events. What you want are these TControl methods (protected): > > function DoCaptureStart(Button: Integer; ShiftKey, CtrlKey, AltKey: Boolean; X,Y: Integer): Boolean; virtual; > procedure DoCapturing(X,Y: Integer); virtual; > procedure DoCaptureEnd(X,Y: Integer); virtual; > > Overriding these methods will allow you to capture the mouse events within the control so that you can handle dragging. Check out the TCaptionBarControl control in the WebCtnrs unit for more information on how this is done. This has worked fine. It would be good to have a "what component is under the mouse" but that's not too hard to write (and given I knew where I was interested in, I can make it more optimal). Key is it is reliable, and effective. Thanks. -- Matthew Jones |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |