Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Basic4ppc Wishlist
Home Register FAQ Members List 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, 08:07 AM
Knows the basics
 
Join Date: Aug 2007
Posts: 53
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 08:19 AM.
Reply With Quote
  #2 (permalink)  
Old 08-23-2007, 09:55 AM
Knows the basics
 
Join Date: Aug 2007
Posts: 53
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, 02:39 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,143
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, 02:42 PM
Knows the basics
 
Join Date: Aug 2007
Posts: 53
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, 02:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,143
Default

It is possible to add it and I think we will add it.
Reply With Quote
  #6 (permalink)  
Old 08-28-2007, 10:11 AM
Knows the basics
 
Join Date: Aug 2007
Posts: 53
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, 10:41 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,143
Default

Nice solution
Reply With Quote
  #8 (permalink)  
Old 01-07-2008, 11:32 AM
Knows the basics
 
Join Date: Aug 2007
Posts: 53
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:

TreeEdit - Powerful Tree Note Editor
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 On
Pingbacks are On
Refbacks are On

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


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


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0