Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrolling a disabled treeview
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00911474
Message ID:
00912031
Vues:
15
>Well, sorry to say it didn't work. I've got this code in the NodeClick of my treeview:
>
>IF node <> This.OldSelectedItem
>   DECLARE INTEGER LockWindowUpdate IN WIN32API INTEGER hWnd
>   = LockWindowUpdate(This.hWnd)
>   This.SelectedItem = This.OldSelectedItem
>   = LockWindowUpdate(0)
>ENDIF
>
>When I click on another node, it's moving me back to the old node, but it's not locking the screen while the highlight moves to the new node and then back to the old node again.

Hi Barbara,

I'm not sure this will help you, but to scroll the (enabled/disabled) treeview is:
1. SendMessage API with TVM_GETNEXTITEM as parameter. You have to play around with this messages a few times to reach the treeview item handle that you want to display.
2. Then SendMessage with TVM_ENSUREVISIBLE to scroll the treeview.

As for example, this code will scroll up by one node:
Declare Long SendMessage in User32 ;
   Long hWndTreeView, Integer uMsg, Long wParam, Long lParam

hItem = SendMessage( ThisForm.Tree1.hWnd, 4362, 5, 0 )
hItem = SendMessage( ThisForm.Tree1.hWnd, 4362, 7, hItem )
SendMessage( ThisForm.Tree1.hWnd, 4372, 0, hItem )
Look here for more info about treeview controls & messages:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/treeview/reflist.asp

HTH
Herman
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform