treeview - i'm on vb6
-
- Administrator
- Posts: 79287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
Re: treeview - i'm on vb6
ops...SORRY but important.
with other code i retrieve
the numbers of region for zona
the numbers of provinces for regione
the numbers of istat for each provincia
the var of numbe is named NRSTRING
possible to insert in tag with the NRSTRING'
for example:
1-NORD OVEST tag=4 (4 are the regions of 1-NORD OVEST)
1-PIEMONTE tag=8 (8 are the provinces of 1-PIEMONTE)
TO-TORINO tag=312 (312 are the ISTAT-COMUNI of TO-TORINO)
Eccc...
Note:
i get the number of ZONE, REGIONI, PROVINCE, with:
...
Select Case LEVEL
Case 0
'ZONA
VV = Split(VALORE, "-")(0)
'Debug.Print VALORE
NRSTRING = ""
CERCA_NUM VV, LEVEL + 1
Case 1
'REGIONE
VV = Split(VALORE, "-")(0)
'Debug.Print VALORE
NRSTRING = ""
CERCA_NUM VV, LEVEL + 1
Case 2
'PROVINCIA
VV = Split(VALORE, "-")(0)
'Debug.Print VALORE
NRSTRING = ""
CERCA_NUM VV, LEVEL + 1
End Select
'Debug.Print LEVEL
Set CHL = Me.TreeView1.nodes.Add(Relative:=NOD, Relationship:=tvwChild, Text:=VALORE)
'Me.TreeView1.nodes.Add(Relative:=NOD, Relationship:=tvwChild, Text:=VALORE).Tag = NRSTRING
....
-
- Administrator
- Posts: 79287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: treeview - i'm on vb6
Set CHL = Me.TreeView1.Nodes.Add(Relative:=NOD, Relationship:=tvwChild, Text:=VALORE)
CHL.Tag = NRSTRING
CHL.Tag = NRSTRING
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 79287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: treeview - i'm on vb6
You could check
Code: Select all
If LEVEL < 3 Then
CHL.Tag = NRSTRING
End If
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
Re: treeview - i'm on vb6
HansV wrote: ↑01 Jul 2024, 12:33You could check
Code: Select all
If LEVEL < 3 Then CHL.Tag = NRSTRING End If
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
Re: treeview - i'm on vb6
based the level number i need to add a icon from iamgelist1.HansV wrote: ↑01 Jul 2024, 12:33You could check
Code: Select all
If LEVEL < 3 Then CHL.Tag = NRSTRING End If
i just set imagelist in:
...
Set Me.TreeView1.ImageList = ImageList1
.Style = tvwTreelinesPlusMinusText
.nodes.Clear
Set NOD = .nodes.Add(Text:="ITALIA")
...
now based the level i need image1, for level 1,image1, for level 2, image2, for level 3.... eccc
-
- Administrator
- Posts: 79287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4470
- Joined: 26 Apr 2010, 17:36
Re: treeview - i'm on vb6
whre here:
...
Set CHL = Me.TreeView1.nodes.Add(Relative:=NOD, Relationship:=tvwChild, Text:=VALORE)
'qui?
If LEVEL < 3 Then
CHL.Tag = "-(" & NRSTRING & ")"
'qui?
End If
If LEVEL < UBound(ARRLEVELS) Then
AddChildren CHL, LEVEL + 1
'qui?
End If
...
-
- Administrator
- Posts: 79287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 5StarLounger
- Posts: 610
- Joined: 14 Nov 2012, 16:06
Re: treeview - i'm on vb6
My suggestion
You do not have the required permissions to view the files attached to this post.