Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6472021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:17:35+00:00 2026-05-25T06:17:35+00:00

I am in the process of migrating software for win32 to .NET and currently

  • 0

I am in the process of migrating software for win32 to .NET and currently working with TreeView control in Delphi Prism. So far I am able to add parent nodes and child nodes to the TreeView. However, I would like to know if there is replacement for AddchildObject function for Delphi Prism TreeView. If not, how would you do it?

It seems there is very little information online about this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:17:35+00:00Added an answer on May 25, 2026 at 6:17 am

    I believe that this question may not get answered by the fellow programmers in here and I feel that this is an important question for any programmers doing Delphi Prism. So, I decided to answer the question myself instead of deleting it, since I found the answer for it in another StackOverflow question. However, my question and their question is different but require the same answer.

    I wrote a quick and simple delphi prism sample to show how to use treeview and to be able to store and retrieve objects in the treeview node.

    Here is my Treeview example

    namespace TreeViewExample;
    
    interface
    
    uses
      System.Drawing,
      System.Collections,
      System.Collections.Generic,
      System.Windows.Forms,
      System.ComponentModel;
    
    type
      /// <summary>
      /// Summary description for MainForm.
      /// </summary>
      MainForm = partial class(System.Windows.Forms.Form)
      private
        method MainForm_Load(sender: System.Object; e: System.EventArgs);
        method treeView1_Click(sender: System.Object; e: System.EventArgs);
      protected
        method Dispose(disposing: Boolean); override;
      public
        constructor;
      end;
    
      theclass = class
      thestr:String;
      public
      constructor;
      end;
    
    implementation
    
    {$REGION Construction and Disposition}
    constructor MainForm;
    begin
      //
      // Required for Windows Form Designer support
      //
      InitializeComponent();
    
      //
      // TODO: Add any constructor code after InitializeComponent call
      //
    end;
    
    method MainForm.Dispose(disposing: Boolean);
    begin
      if disposing then begin
        if assigned(components) then
          components.Dispose();
    
        //
        // TODO: Add custom disposition code here
        //
      end;
      inherited Dispose(disposing);
    end;
    {$ENDREGION}
    
    constructor theclass;
    begin
      thestr:='Testing Treeview.';
    end;
    
    method MainForm.MainForm_Load(sender: System.Object; e: System.EventArgs);
    var topnode:treenode;
        theObject:theclass;
    begin
      theObject:=new theclass;
      treeview1.BeginUpdate;
      topnode:=treeview1.Nodes.Add('node1');
      topnode.Nodes.Add('no data node');
      topnode.Nodes.Add('data node').Tag := theObject;
      topnode.Expand;
      treeview1.EndUpdate;
    end;
    
    method MainForm.treeView1_Click(sender: System.Object; e: System.EventArgs);
    begin
      if treeview1.SelectedNode.Text='data node' then
        MessageBox.Show(theClass(Treeview1.SelectedNode.Tag).thestr);
    end;
    
    end.
    

    Here is the link to the question.

    save text fields to an Array (and pull data from the Array) when using treeview in c#

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently in the process of migrating our software solution from Delphi 7
We are in the process of migrating our ASP.NET application to use Jquery instead
I am in the process of migrating a SQL 2008 R2 database between software
I am in the process of migrating a VB6 app to .Net and we
I am currently in the process of migrating an old system to another server
We are in the process of migrating an app to .NET 4.0 (from 3.5).
We are currently in the process of migrating our application from our production environment
We are in the process of migrating an ASP Classic/ASP.NET application from IIS 6
We are currently in the process of migrating from an aged proprietary directory service
So I am currently going through the process of migrating alot of projects from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.