Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TreeView.BackColor ???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00318866
Message ID:
00319358
Vues:
15
Something is wrong...



ok, i can change de backcolor of the treeview, BUT.
If I add nodes, the trre-lines does not change. OK, I found the solution in the KB: change the treeview style to 0, then to whatever you need. It solves something, but not all.
Under the last expanded node, if it has some childs, and no more nodes at this parent level, a blank bitmap appears in the space that the line will be connecting this parent with the following, but, no more nodes at same level. Then You can have a treeview full of blank squares in the space beteen them.

Help!!!!!!, please. No solution in hte KB :O(


LOCAL lnColorRef, loNodo

declare integer SendMessage in win32api integer, integer, integer, integer
#define TV_FIRST 0x1100
#define TVM_SETBKCOLOR (TV_FIRST + 29)

Thisform.trvUsos.STYLE=0 && set style to no lines

* oCte.backcolorindice is a preloaded constant with some rgb(R,G,B) color

for each loNodo in thisform.trVusos.nodes
loNodo.backcolor=oCte.backcolorindice
next

lnColorRef = SendMessage(Thisform.trvUsos.HWnd, TVM_SETBKCOLOR, rgb(0,0,0), oCte.backcolorindice)

* KB tells that we need to change the style to proper display of lines...
* I tested it, And it is not neccesary to use the api cals. we have the style property, and it works the same way.
*!* lnStyle=GetWindowLong(Thisform.oletree.HWnd, GWL_STYLE)
*!* =SetWindowLong(Thisform.oletree.HWnd, GWL_STYLE, lnStyle-TVS_HASLINES)
*!* =SetWindowLong(Thisform.oletree.HWnd, GWL_STYLE, lnStyle)

* again, I paint the lines.

Thisform.trvUsos.STYLE=7
------------------------------------
Miguel Angel Hernaiz
miguel@gnomo.net --- miguel@vfug.org
ICQ: 3813422 --- www.gnomo.net
------------------------------------
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform