Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HitTest method in Microsoft TreeView ActiveX control
Message
From
25/11/1997 19:46:59
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00031436
Message ID:
00062312
Views:
101
>>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.
>
>Renato, I tried to do that, and found that Activex controls at runtime always stays on top, even if in form designer it was covered by other control. Pity.

Hello Nick!

You're right about this Active-X behaviour. But I've been playing with the TreeView these days and I found out that what's REALLY a pity is that the HitTest method is not working anymore...

If only we could get it to work properly, then it would be possible to Drag a node even to the "invisible" parts of the TreeView!

The logic is simple but it's not so obvious to implement because it requires those "amazing" recursive functions. There's no need to use another control over the TreeView - we can use its own DragOver event. Into this event the first step would be to get a reference of the node where we're dragging over (at this point, HitTest should do its job...). Then it would be necessary to see if that node is situated at one of the borders of the TreeView (considering the vertical direction). If the node is situated at the border, we should check if there's any other node hidden behind the border. If the answer is yes then we could show it with the EnsureVisible. The algorithym is different considering the top and the bottom borders, but the logic is the same.

I have simulated all of this using the NodeClick, and everything seemed to be working correctly. But it has no use without the HitTest...

Regards...
Previous
Reply
Map
View

Click here to load this message in the networking platform