Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting Drag
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01033566
Message ID:
01034298
Views:
19
Ok, the file is here

Run form 'Demo'. Not all options on the demo work yet, but you'll get the idea.

Thanks




>Sounds complicated. :) Can't really say more without actually seeing it. Can you sent me a sample?
>
>>A Row is a container with various types of objects on is; Labels, textboxes, hyperlinks
>>and the like.
>>
>>The Row is added to the ScrollSlide container which is moved left, right, up or down
>>by the scrollbars.
>>
>>The ScrollSlide is on the list, which is also a container.
>>
>>When the user drags across row(s), I need to select them. Selecting a row is done
>>by reversing it's colors.
>>
>>The issue is how to know when one or more rows has been selected by dragging. Each row
>>would know individually, but as a group, how would they know?
>>
>>In other words, the selection processes really belongs on the list, not the row.
>>
>>
>>
>>
>>
>>
>>>So, is every "listbox row" actually a separate object? Then MouseMove() approach should work for you.
>>>
>>>>Its a compound control I created
>>>>
>>>>
>>>>>Then it might be different. Is that the actual VFP listbox or some compound control that looks like listbox? If that is a listbox, then you have only one object under the mouse - the listbox itself. You might try to calculate how many rows are under the mouse in the mouse move process. If the mouse button is pressed, that might interfere with the normal listbox responce to the mouse.
>>>>>
>>>>>>I have a listbox style control that I created.
>>>>>>
>>>>>>When the user drags the mouse down the list, I want to
>>>>>>know what rows were dragged over.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>I want to select multiple objects on screen when the user drags the
>>>>>>>>mouse over them.
>>>>>>>>
>>>>>>>>How do I do this?
>>>>>>>
>>>>>>>Hi Kevin,
>>>>>>>
>>>>>>>What exactly "the user drags the mouse over them" means?
>>>>>>>
>>>>>>>Say, the user dragged the mouse drawing S - shaped line. There are multiple controls on the form. Do you want only the controls the mouse went over directly to be selected?
>>>>>>>Or include any controls that are within the rectangle defined by the initial and final mouse positions?
>>>>>>>
>>>>>>>For the first case you could use MouseMove() event, "probing" the underlying controls with SYS(1270), for example:
>>>>>>>
>>>>>>>loTarget = SYS(1270) && Get the object under the mouse
>>>>>>>cTarget = SYS(1272, loTarget) && get the object hierarchy for a specified object.
>>>>>>>
>>>>>>>
>>>>>>>For the second case you could deternine the initial and final mouse positions and then write a routine that will check what controls on the form are withing that rectangle. In both cases the list/array of "selected" controls can be created and somehow processed later.
>>>>>>>
>>>>>>>Both ways could be combined, depending on what you are going to achieve. Also, I assume you are dragging the mouse with Left or Right mouse button pressed.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform