Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HitTest method in Microsoft TreeView ActiveX control
Message
De
19/11/1997 16:50:56
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brésil
 
 
À
10/11/1997 10:59:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00031436
Message ID:
00061256
Vues:
93
>I'm triyng to use the TreeView with Drag & Drop capabilities, The HitTest never returns a Node (even using a factor - 15- in the coordinates), I use the DragOver if I move an external control and the OleDragOver if I try to move a node, in both cases the HitTest returns .null.. ??? (I'm using WinNT 4.0 and the Comctl32.ocx 5.01.4319.
>
>The CreateDragImage returns an image, and the DragIcon expects a CUR file.
>
>Does the EnsureVisible works to scroll the TreeView?

Hello Xan!

I didn't have much time to improve the TreeView Drag & Drop features since I wrote the message you've recovered. But a quick test showed me what Nick had already told us here: Even with the factor of 15, the HitTest is not working anymore (I suppose this is happening only with the newest version of Comctl32.ocx). That's something to be asked to MS...

Anyway, I'm still not using HitTest on my programs. But I could use CreateDragImage and DragIcon, so, as soon as possible, I'll have a look at them... Thanks!

About the use of EnsureVisible, I believe it's possible to scroll automatically the TreeView during a Drag & Drop operation (but also didn't have time to try it). I would try to put a control (maybe a shape or a container) over the top and over the bottom of the TreeView. Then in the MouseMove or MouseOver of that control the logic could be something like:

1- Enable a timer
2- If user is over there within a Drag operation during more than a specific time...
3- Catch the lowest index (or highest depending on which control you're over) of a visible Node.
4- EnsureVisible a specific number of Nodes with consecutive indexes before (or after) the index discovered on step 3.
5- Reset the timer

Does it help you to achieve what you want? Also let me know if you succeeded...

Regards,

Renato
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform