Print Page | Close Window

[HELP] [VB6] Codejock Treeview

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=17552
Printed Date: 29 March 2024 at 8:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [HELP] [VB6] Codejock Treeview
Posted By: carb0n
Subject: [HELP] [VB6] Codejock Treeview
Date Posted: 12 November 2010 at 7:35am
Hello guys, anyone could help me on adding icons to treeview nodes?

I tried:

Set tvMain.Icons = imMain.Icons
    tvMain.Nodes.Add , , "Nod1", "Nod1", 1 <-- This should be the Icon "1" on my Image Manager


But doesn't work.

Also How to works with clicks?


    tvMain.Nodes.Add , , "Nod1", "Nod1", 1
    tvMain.Nodes.Add "Nod1", xtpTreeViewChild, "File Selection", "File Selection", 2
    tvMain.Nodes.Add "Nod1", xtpTreeViewChild, "Message", "Message", 3


How to, when we click on File Selection it do Msgbox "File Selection" and when we click on "Message" it do MsgBox "Message".

Thanks in advance guys ;)



Replies:
Posted By: SuperMario
Date Posted: 12 November 2010 at 10:48am
Try to set icon size to 16 for tree control.


Posted By: carb0n
Date Posted: 12 November 2010 at 11:29am
Originally posted by SuperMario SuperMario wrote:

Try to set icon size to 16 for tree control.


Thanks man, worked fine. Another question, how to call each nodes ? i mean:

Private Sub Form_Load()
Set tvMain.Icons = imMain.Icons
    tvMain.IconSize = 16
    tvMain.Nodes.Add , , "Node1", "Node1", 1
    tvMain.Nodes.Add "Node1", xtpTreeViewChild, "File Selection", "File Selection", 2
    tvMain.Nodes.Add "Node1", xtpTreeViewChild, "Message", "Message", 3
End Sub


I want that when we click on "File Selection", it do: Msgbox "File Selection"
and for "Message": Msgbox "Message"

Thanks in advance again (:


Posted By: SuperMario
Date Posted: 12 November 2010 at 3:24pm
Private Sub treeSolutionView_NodeClick(ByVal Node As XtremeSuiteControls.TreeViewNode)
    MsgBox Node.Text & " clicked"
End Sub


Posted By: carb0n
Date Posted: 12 November 2010 at 3:40pm
Thanks (:



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net