Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically change the backcolor of a TreeView
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01031609
Message ID:
01031652
Vues:
16
Bhavbhuti,

>I have tried to modify the backcolor of my text controls. Sticking out like a sore thumb is the TreeView which has the default white backcolor.

There is no native property. You have to do a SendMessage to the HWND of the TreeView control to change its background color:
#DEFINE TV_FIRST  0x1100
#DEFINE TVM_SETBKCOLOR  TV_FIRST+29

nBackColor = ThisForm.BackColor

Declare LONG SendMessage IN WIN32API ;
    Long hwnd, Long wMsg, Long wParam, Long lParam

SendMessage(oTreeView.hWnd, TVM_SETBKCOLOR, 0, nBackColor)
NOTE: You will still need to loop through the nodes and change their back color also.

Search for "TVM_SETBKCOLOR" on MSDN for more info
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform