Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - [HELP] [VB6] Codejock Treeview
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[HELP] [VB6] Codejock Treeview

 Post Reply Post Reply
Author
Message
carb0n View Drop Down
Newbie
Newbie


Joined: 12 November 2010
Location: 127.0.0.1
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote carb0n Quote  Post ReplyReply Direct Link To This Post Topic: [HELP] [VB6] Codejock Treeview
    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 ;)
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2010 at 10:48am
Try to set icon size to 16 for tree control.
Back to Top
carb0n View Drop Down
Newbie
Newbie


Joined: 12 November 2010
Location: 127.0.0.1
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote carb0n Quote  Post ReplyReply Direct Link To This Post 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 (:
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2010 at 3:24pm
Private Sub treeSolutionView_NodeClick(ByVal Node As XtremeSuiteControls.TreeViewNode)
    MsgBox Node.Text & " clicked"
End Sub
Back to Top
carb0n View Drop Down
Newbie
Newbie


Joined: 12 November 2010
Location: 127.0.0.1
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote carb0n Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2010 at 3:40pm
Thanks (:
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.