Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scroll in the TreeView OleDragAndDrop event
Message
From
12/11/2001 13:32:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00580528
Message ID:
00580563
Views:
13
>I have a very demanding user who wants to scrolling up/down the treeview to kick in where / when it should ie going trying to past the 'drop' area with more items further down / up the tree.
>
>At the mo they have to drag an item, drop it half way, scroll and drag it again to achieve the same effect.
>
>Any ideas please.
>
>Thank you

Mathias,
I assume you use OleDragOver (150 is a threshold). You could use EnsureVisible.
  Procedure oletreeview.OLEDragOver
  *** ActiveX Control Event ***
  Lparameters data, effect, button, shift, x, y, state
  oHitTest = THIS.HitTest( x * THISFORM.nxtwips, Y * THISFORM.nytwips )
  If type("oHitTest")= "O"
    This.DropHighlight = oHitTest
    if !isnull(oHittest)
     if y <= this.top + 150 ;
       and type('oHitTest.Previous')='O' ;
       and !isnull(oHitTest.Previous)
    	oHitTest.Previous.EnsureVisible
     endif	
     if y >= this.top + this.height - 150 ;
      and type('oHitTest.Next')='O' ;
      and !isnull(oHitTest.Next)
  	oHittest.Next.EnsureVisible
     endif	
    endif
  Endif
Endproc
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform