Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
Mouse Capture |
Wed, Dec 18 2013 9:49 AM | Permanent Link |
Matthew Jones | Normally, when a user clicks on a component and starts to drag, you would "capture"
the mouse input so that you can find out when the user releases the mouse button, even if away from the initial control. Is there a way to do this in EWB? I see mention of mouse capture in 1.02, but can't find anything about how to do this. Clues? Is it even possible? /Matthew Jones/ |
Thu, Dec 19 2013 2:40 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< Normally, when a user clicks on a component and starts to drag, you would "capture" the mouse input so that you can find out when the user releases the mouse button, even if away from the initial control. Is there a way to do this in EWB? I see mention of mouse capture in 1.02, but can't find anything about how to do this. Clues? Is it even possible? >> There's two things here: 1) If you just want to drag a control, then look at the TControl.BeginDrag method (protected, but you can promote it). That will kick the whole process off, and the event manager will handle everything, including making sure that it doesn't leave the boundaries of the parent control. 2) If you really need to capture the mouse for reasons other than dragging the control, then you can use this code: Start: EventManager.CaptureMouse(MyControl); End: EventManager.EndCapture; The grid uses this for sizing the columns - it captures the mouse for the entire grid so that if you move the mouse outside of the bounds of the grid, it still "has" the mouse. If you have any other questions, please let me know. Tim Young Elevate Software www.elevatesoft.com |
Fri, Dec 20 2013 5:00 AM | Permanent Link |
Matthew Jones | Thank you. I don't want to use "built in" drag as it probably isn't quite what I
want (on one, it is a horizontal slider only). Capturing the mouse will work to improve it though (I had added the OnLeave though, but it isn't so good). /Matthew Jones/ |
Fri, Dec 20 2013 5:49 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< I had added the OnLeave though, but it isn't so good >> ??? Tim Young Elevate Software www.elevatesoft.com |
Fri, Dec 20 2013 8:47 AM | Permanent Link |
Matthew Jones | > << I had added the OnLeave though, but it isn't so good >>
> > ??? I note the smiley, but rather than have the control think the mouse was still down, I assumed mouse up when the cursor left. /Matthew Jones/ |
Sun, Dec 22 2013 7:35 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< I note the smiley, but rather than have the control think the mouse was still down, I assumed mouse up when the cursor left. >> Ahhh, gotcha. Yes, that can cause some non-standard behaviors for the user. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, March 27, 2024 at 05:29 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |