You are not logged in.

GDR

Beginner

  • "GDR" started this thread

Posts: 5

Date of registration: Sep 14th 2011

  • Send private message

1

Wednesday, October 12th 2011, 8:09pm

Treeview - Node Add

Hi all,



Perhaps someone can point me in the right direction here as I seem to be missing it somehow or is this not implemented.... When adding a node in a treeview i.e. tvwViewX.Nodes.Add tvwViewX.Nodes.Item("root"), tvwChild, strKey, "strMachDescX", the parameter being entered in parameter 3 ("strKey") in my case is really useful database indices in string format, however the key is not accessible after creation of the node, yet again, I may be missing and if so where is it.



In advance...



Many thanks





GDR

GDR

Beginner

  • "GDR" started this thread

Posts: 5

Date of registration: Sep 14th 2011

  • Send private message

2

Thursday, October 13th 2011, 8:07pm

Resolved...

Hi, I have extended the code in the framework to resolve this.... many useful pointers in here, however does require a bit of digging. Thanks for all the responses none the less....

aawaad

Beginner

Posts: 9

Date of registration: Jul 7th 2009

  • Send private message

3

Saturday, November 12th 2011, 10:33am

Tree Node Key & tag

Dear GDR,

I am looking for the proper code to extend the Node & Nodes to add property Get for the Key & Tag. I am badly need that code and the process of compiling them in the framework, appreciate if you can copy me the info.

Regards,

Ashraf

GDR

Beginner

  • "GDR" started this thread

Posts: 5

Date of registration: Sep 14th 2011

  • Send private message

4

Monday, November 14th 2011, 9:33am

Class Node


Source code

1
2
3
4
5
6
7
8
9
10
11
'Add 
Dim myKey As String 

'Add 
Public Property Get Key() As String 
Key = myKey 
End Property 

Public Property Let Key(sKey As String) 
myKey = sKey 
End Property






Class Nodes


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
'Edit 
Public Function Add(Relative As Node, Relationship As TreeRelationshipConstants, Key As String, Text As String, Image As #IResource) As Node 
Dim myNode As New Node(myTree, Text) 
myNode.Text = Text 
myHash.Add myNode, Key 

myNode.Key = Key 
myNode.Icon = Image 
myNode.ForeColor = myTree.ForeColor 
myNode.BackColor = myTree.BackColor 
myNode.ForeColorSel = myTree.ForeColorSel 
myNode.BackColorSel = myTree.BackColorSel 
myNode.FontName = myTree.FontName 
myNode.FontBold = myTree.FontBold 
myNode.FontItalic = myTree.FontItalic 
myNode.FontSize = myTree.FontSize 

If Relative = Nothing Then 
Call myTree.Model.insertNodeInto myNode, myTree.Root, myTree.Root.ChildCount 
Else 
Call myTree.Model.insertNodeInto myNode, Relative, Relative.ChildCount 
End If 

myTree.Root.Expand = True 
Add = myNode 

End Function

aawaad

Beginner

Posts: 9

Date of registration: Jul 7th 2009

  • Send private message

5

Thursday, November 17th 2011, 12:50am

Thanks GDR.

How can I compile the code into Jabaco.jar, I tried but still I cannot get the Key to appear as property. What are the right steps to compile my extensions inside the framework?

I have the environment with ant and fresh svn code and added the above code as well.

BR

Ashraf

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

6

Thursday, November 17th 2011, 1:33am

@ GDR:
I thank you too.
I have uploaded the changes to the svn:
http://code.google.com/p/jabacoframework/source/detail?r=86

@ aawaad:
I have uploaded a new binray:
[ Jabaco-rev86.jar ]
The added key-property in node/nodes is the only change of this new version.

Greatings
theuserbl

Rate this thread
WoltLab Burning Board