Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - TreeView Help  v11.2.1
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TreeView Help v11.2.1

 Post Reply Post Reply
Author
Message
JTC2008 View Drop Down
Newbie
Newbie
Avatar

Joined: 13 October 2008
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote JTC2008 Quote  Post ReplyReply Direct Link To This Post Topic: TreeView Help v11.2.1
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2008 at 1:21am
Hi,
NodeClick fires when you change selection. With Mouse or Keyboard.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JTC2008 View Drop Down
Newbie
Newbie
Avatar

Joined: 13 October 2008
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote JTC2008 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
JTC2008 View Drop Down
Newbie
Newbie
Avatar

Joined: 13 October 2008
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote JTC2008 Quote  Post ReplyReply Direct Link To This Post 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
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.171 seconds.