Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Basic4ppc Wishlist Missing any feature?

Adding Data to TreeView Nodes

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-23-2007, 07:07 AM
Woinowski's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 105
Awards Showcase
Beta Tester 
Total Awards: 1
Default Adding Data to TreeView Nodes

Hi,

I'd like to be able to add data (a string, number or even arbitrary variable type) to each tree node.

As an example: imagine a notepad with a tree structure (there's a lot of those out there, just an example).

You would be able to navigate through the tree to your notes and each node could contain a note(text string).

Currently, I can only think of awkward workarounds (e.g., simulating a tree with the same structure in an ArrayList).

Just using the Node.Text member is not the correct idea: In the tree view I would only want to show titles of the notes/nodes.
Jens

Last edited by Woinowski : 08-23-2007 at 07:19 AM.
Reply With Quote
  #2 (permalink)  
Old 08-23-2007, 08:55 AM
Woinowski's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 105
Awards Showcase
Beta Tester 
Total Awards: 1
Default Addition: Look at Visual Studi

To make my idea clear:

In visual studio the TreeView-Node Class has a member "Tag" for user defined data (in C#) That's just what I am looking for....
Reply With Quote
  #3 (permalink)  
Old 08-23-2007, 01:39 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,698
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The Tag property of .Net Framework controls is only available on the full framework (not .Net CF).
Reply With Quote
  #4 (permalink)  
Old 08-23-2007, 01:42 PM
Woinowski's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 105
Awards Showcase
Beta Tester 
Total Awards: 1
Default

And it is not possible to add something similar, even a simple string tag, to the B4PPC library Node class?
Reply With Quote
  #5 (permalink)  
Old 08-23-2007, 01:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,698
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

It is possible to add it and I think we will add it.
Reply With Quote
  #6 (permalink)  
Old 08-28-2007, 09:11 AM
Woinowski's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 105
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Cool. I'm looking forward to that. Currently I have found a workaround:

I use a tree without images. The image index can be used to reference an item in an arraylist :-)
Reply With Quote
  #7 (permalink)  
Old 08-28-2007, 09:41 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,698
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Nice solution
Reply With Quote
  #8 (permalink)  
Old 01-07-2008, 10:32 AM
Woinowski's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 105
Awards Showcase
Beta Tester 
Total Awards: 1
Default As promised - how to add more information to a node and more

You will find some interesting implementation tricks in the following open source project:

http://www.basic4ppc.com/forum/open-source-projects/1514-treeedit-powerful-tree-note-editor.html
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding calendar in runtime Cableguy Basic4ppc Wishlist 2 05-23-2008 05:23 PM
Adding time Sascha K. Questions (Windows Mobile) 3 03-23-2008 07:46 PM
Sorted objects when adding agraham Basic4ppc Wishlist 0 11-18-2007 03:47 PM
Adding a Icon to a Control. cdeane Questions (Windows Mobile) 1 09-29-2007 05:56 AM
Treeview - different pics for nodes? token Questions (Windows Mobile) 4 07-15-2007 05:31 AM


All times are GMT. The time now is 02:34 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0