Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting Drag
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01033566
Message ID:
01033872
Vues:
12
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.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform