•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 373,563 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,877 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser:
TreeView was one of my favourite control in COM. It is well suited for creating Chart of Accounts, Hierarchical data and the like. Though there is a tree view in .Net I find it less flexible in comparison to COM TreeView.
The issue with using COM TreeView in C# is C# does not support optional parameters. Type.Missing it the way out.
The issue with using COM TreeView in C# is C# does not support optional parameters. Type.Missing it the way out.
Last edited : Feb 15th, 2008.
using MSComctlLib; Node NodX; private void Form1_Load(object sender, EventArgs e) { Object m = Type.Missing; Object i = "India"; NodX = axTreeView1.Nodes.Add(ref m, ref m, ref i, ref i, ref m, ref m); Object k = "Kerala"; Object rel = TreeRelationshipConstants.tvwChild; NodX = axTreeView1.Nodes.Add(ref i, ref rel, ref k, ref k, ref m, ref m); Object ka = "Karnataka"; NodX = axTreeView1.Nodes.Add(ref i, ref rel, ref ka, ref ka, ref m, ref m); Object ko = "Kochi"; NodX = axTreeView1.Nodes.Add(ref k, ref rel, ref ko, ref ko, ref m, ref m); NodX.EnsureVisible(); }
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)