Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Treeview node in Bold 2

Status
Not open for further replies.

cbsm

Programmer
Oct 3, 2002
229
FR
Hi,
For some strange reason, I can't set a sprecific node in bold (or change back/forcolor or anything to distinguish it from another).
I tried this :

Dim nodx As Node
'look in the treeview for the node I want
treeview.Nodes("myNode").bold = True

or
set nodx=treeview.Nodes("myNode")
nodx.bold=true

but it says the property doesn't exits (it doesn't appear on the property list - error at run time).

I looked on the forum though, and it seemed to be the right syntax.
I am on VB6 - Sp6

Thanks
 
CBSM,

Are you trying something similar? Try this is in the NodeClick Event.

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
Node.Bold = Not Node.Bold
End Sub

------------------------------------------
The faulty interface lies between the chair and the keyboard.
 
vbSun,

Still the same problem :
"Method or Data Member not found"
Is the error.
When I write the code, the property "Bold" doesn't appear after Node. .
It seems it doesn't recognize this property.
I have VB6 - and SP6.
Maybe I am missing something ?

Thanks,
 
I am not sure about that.

I have the same VB6, SP6 and assume the Common Controls version 6.00.8105 is also there. It is working perfectly in my box.



------------------------------------------
The faulty interface lies between the chair and the keyboard.
 
Try this

Dim nodx As MSComctlLib.Node

instead of

Dim nodx As Node

Transcend
[gorgeous]
 
What version of common controls are you using? You should be able to view this from the references dialog box.
 
I just checked again, I am using SP5 - not 6 as I thought.
Windows Common Controls 5.0 - SP2
I suppose that's where the problem lies ...
I tried to change it to
Windows Common Controls 6.0 - SP4
(or is Windows Common Controls3-6.0 - SP5 the latest ?)
but it's telling me : "can't remove control or reference ; already in use" - how do I do this ?
(Do I have to delete all the controls corresponding to this reference, change the ocx, and put them back again ? - hope there is an easier way ...)

Thanks,



 
Thank you both - a star for each of you !

I combine the two post to make it work.

I am still a bit annoyed because I have both version referenced in my project - and believe this is not quite right and was only possible because they don't have the same name.
I changed all the controls (treeview, imagelist, status bar) to the one from the latest version - but still can't remove the old one ...
Maybe I forgot one - will go through all this again - or is there something else to do ?

Thanks again
 
To remove those components try this.

1. Create a blank project
2. Cut all the controls from you main project and paste them into the blank project.
3. Remove unwanted components (should work as there should be no controls on the form to utilize them)
4. Cut all controls from you blank project and paste them back in your Main project.

You sometime cant remove a component until all controls that utilize it are removed.
 
You can also try editing the .frm file in a normal text editor (or Notepad), search and replace all references to the older version. I've done this before and it works, just be careful.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top