KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Further discussion re: TreeView enhancements

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat May 29, 2004 5:23 pm    Post subject: Further discussion re: TreeView enhancements Reply with quote

There were some discussion/ideas from here:

Programmatically change SelectedNode

and one of the members had an idea about using special index keys for the treeview ... think it was Ben ... anyways, I was searching the web and bumped into this custom treeview :

PureComponents TreeView

and specifically this page which has code examples using this custom treeview:

Code Examples

Specifically this piece of code:

Code:

private void Form1_Load(object sender, System.EventArgs e)
{
  Treeview1.Nodes.Add("Calendar");     
  Node MailNode = Treeview1.Nodes.Add("Mail");
  Node InboxNode = MailNode.Nodes.Add("Inbox", "ID01");
  InboxNode.Nodes.Add("Unread Email", "ID02");
  InboxNode.Nodes.Add("For Follow Up", "ID03");
  Node MyFolder = InboxNode.Nodes.Add("My Folder", "ID04");
  MyFolder.Nodes.Add("Info", "ID05");
  MyFolder.Nodes.Add("Personal", "ID06");
  MyFolder.Nodes.Add("Programming", "ID07");
  MailNode.Nodes.Add("Drafts", "ID08");
  MailNode.Nodes.Add("Outbox", "ID09");
  MailNode.Nodes.Add("Sent Items", "ID10");
  MailNode.Nodes.Add("Deleted Items", "ID11");
  Treeview1.Nodes.Add("Contacts");
  Treeview1.Nodes.Add("Tasks");
  Treeview1.Nodes.Add("Notes");
  MailNode.Select();       
}


What they've done is to allow a special "key" like "ID11" to be associated with each node, the one can do this:

Code:

private Node GetInboxNode()
{
  return(Treeview1.GetNodeByKey("ID01"));
}


Thoughts anyone - this isn't a standard feature of the TreeView but could certainly look into implementing this ...
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat May 29, 2004 5:57 pm    Post subject: Reply with quote

In fact, could maybe even implement method(s) like:

$Node = $TreeView.GetNodeByTag(...)

$Node = $TreeView.GetNodeByText(...)

You get the idea. Would have to perform a linear search of the tree but would be pretty fast embedded in KF as opposed to script.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat May 29, 2004 5:59 pm    Post subject: Reply with quote

In fact, if you check-out some of the code in the above link, they've thought up with ALL KINDS of neat new TreeView ideas ... like :

Tree1.AddNodeByPath("\\Mail\\Inbox\\Unread Email");
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Sat May 29, 2004 7:19 pm    Post subject: Reply with quote

well, thought I suggested that already? (still doubted if that's doable by you though...)
_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Sealeopard
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 436
Location: Boston, MA

PostPosted: Sat May 29, 2004 11:19 pm    Post subject: Reply with quote

I definitely like the AddNodeByPath idea.
_________________
Jens

'There are two kinds of vessels, submarines and targets.'
Back to top
View user's profile Send private message Send e-mail MSN Messenger
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Sun May 30, 2004 1:30 am    Post subject: Reply with quote

So when can we get this? Very Happy
_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group