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 6114091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:56:03+00:00 2026-05-23T14:56:03+00:00

I have no experience with frames. How to use a Tree View with frames?

  • 0

I have no experience with frames.

How to use a Tree View with frames?
I need to switch among nods of the Tree View and show assigned Frame to the selected node.

Big big thank for help!!!

  • 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-23T14:56:04+00:00Added an answer on May 23, 2026 at 2:56 pm

    It doesn’t really make any difference if the Data of nodes hold a pointer to a frame or any other kind of object, typecast the pointer to the type of object it holds.

    Below code adds two frames (‘Frame2’ and ‘Frame3’, created by the IDE – much like a new form), as nodes of a TreeView, and sets the visibility of the selected node’s frame to true and the deselected one’s to false.

    type
      TForm1 = class(TForm)
        TreeView1: TTreeView;
        procedure FormCreate(Sender: TObject);
        procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
        procedure TreeView1Changing(Sender: TObject; Node: TTreeNode;
          var AllowChange: Boolean);
        procedure FormDestroy(Sender: TObject);
      end;
    
    var
      Form1: TForm1;
    
    implementation
    
    uses Unit2, Unit3;
    
    {$R *.dfm}
    
    procedure TForm1.FormCreate(Sender: TObject);
    begin
      TreeView1.Align := alLeft;
    
      with TFrame(TreeView1.Items.AddObject(nil, 'Frame2', TFrame2.Create(nil)).Data) do begin
        Visible := False;
        Parent := Self;
        Align := alClient;
      end;
    
      with TFrame(TreeView1.Items.AddObject(nil, 'Frame3', TFrame3.Create(nil)).Data) do begin
        Visible := False;
        Parent := Self;
        Align := alClient;
      end;
    end;
    
    procedure TForm1.FormDestroy(Sender: TObject);
    var
      i: Integer;
    begin
      for i := 0 to TreeView1.Items.Count - 1 do
        TFrame(TreeView1.Items[i].Data).Free;
    end;
    
    
    procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode);
    begin
      TFrame(Node.Data).Visible := True;
    end;
    
    procedure TForm1.TreeView1Changing(Sender: TObject; Node: TTreeNode;
      var AllowChange: Boolean);
    begin
      if Assigned((Sender as TTreeView).Selected) then
        TFrame(TTreeView(Sender).Selected.Data).Visible := False;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small problem. I use a Frame to show a website, unfortunateli
Anyone have experience with algorithmic trading (like stocks)? Any good services to use to
I have a series of objects containing product information that I need to use
I have two data.frames as follows: df1 <- data.frame(A=c(lee,eeu,ees), B=c(lee,ggu,1su), C=c(1,1,1) A B C
Anyone have experience with adding a ReSharper profile to the VS2008 solution and share
I have experience in PHP, JSP/servelts and classic ASP, and I am trying to
I have experience with OCaml. You had to write a stub for every function
Anyone have experience with this plugin? I have it installed but I have no
anyone have experience doing this? when i say imaginary i mean the square root
Does anyone have experience using the URL Rewrite Module (see here )? Can it

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.