TreeView Help v11.2.1
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=12429
Printed Date: 16 November 2024 at 7:30pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: TreeView Help v11.2.1
Posted By: JTC2008
Subject: TreeView Help v11.2.1
Date Posted: 13 October 2008 at 7:04pm
Hi,
I am knockiing myself out trying to get this to work. Can you please help me.
Private Sub Form_Load() With TV .Top = 480 .Left = 120 .Width = Me.ScaleWidth - 240 .Height = Me.ScaleHeight - 1200 .Enabled = True End With With TV .Icons.LoadBitmap App.Path & "\images\img_classtree.bmp", Array(1, 2, 3, 4, 5, 6, 7, 8), xtpImageNormal .Nodes.Add , , "Root", "Available QA Functions", 2 .Nodes.Add "Root", xtpTreeViewChild, "NCR_Register", "View NCR Register", 4 .Nodes("Root").Bold = True .Nodes("Root").Expanded = True .ShowLines = xtpTreeViewShowLinesAtRoot .ShowPlusMinus = True End With End Sub
Private Sub TV_NodeClick(ByVal Node As XtremeSuiteControls.TreeViewNode)
' Determine Which Node Was Clicked Select Case Node.Index Case 0: MsgBox "test" Case 1: MsgBox "test2" End Select End Sub
Here's my problem. No matter what i do, I cant get the treeview nodes to actually do anything when i click on them.
I was actually hoping to do a "Select case Node.key" in case the nodes get out of synch etc. in the finished app, there will be many nodes added .
What am I doing rong here. any help would be a godsend.
Thanks Jim
|
Replies:
Posted By: Oleg
Date Posted: 14 October 2008 at 1:21am
Hi,
NodeClick fires when you change selection. With Mouse or Keyboard.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: JTC2008
Date Posted: 14 October 2008 at 10:10am
Thanks for your reply,
I tried adding event handlers to the NodeClick event on your sample app and it works absolutely as intended.
Unfortunately I can't get this to work when i try it on my own application.
I'll start again with this, I may have done something wrong.
Cheers Jim
Update: I have tried this on an SDI form and it works fine. When i add this in an MDI application, adding the treeview component to a pane in the shortcut bar, then the treeview does not execute node_click
I'm completely lost now.
ps. I just noticed I made a mistake in the title of this thread. The version I have is v11.2.0 and not v11.2.1 as it states the the title of the post. Sorry about that.
|
Posted By: JTC2008
Date Posted: 15 October 2008 at 4:21am
Hi,
Issue now resolved. I didn't realise the treview control couldn't be added directly to a form.
When i place it inside a container control it works perfectly.
Thanks Jim
|
|