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

  • Home
  • SEARCH
  • 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 7509921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:04:11+00:00 2026-05-29T23:04:11+00:00

i have 2 tframes, and an add button. I am trying to add one

  • 0

i have 2 tframes, and an add button. I am trying to add one tframe onto the other when the button is press. but for w.e reason my code can’t seem to work. it’s not adding the frame like it’s suppose to. there is no errors or running, it compiles and runs, but when i press the button it does nothing. i got it to work when i added a tframe to a scrollbox, and all i did was change the location for the tframe to be added.

code for TFrame2

void __fastcall TFrame2::AddFrame()
{
    int temp = 0;
    TFrame1* NewFrame1 = new TFrame1(this);
    NewFrame1 ->Parent=this;

    TComponentEnumerator * ParentEnum = GetEnumerator();

    while(ParentEnum->MoveNext())
    {
        temp++;
    }

    NewFrame1 ->SetIndex(temp);
    NewFrame1 ->Name = "Frame" + IntToStr(temp);
    NewFrame1 ->Top = ( NewFrame1 ->Height ) * (temp);
}

this is the code i use for TFrame1 itself

void __fastcall TFrame1 ::SetIndex(int temp)
{
    this->temp= temp;
}

int __fastcall TFrame1 ::GetIndex()
{
    return this->temp;
}

a lil bg info: the reason i have to add tframe to another tframe, is so i can add a group of components onto another group of components, i didn’t know any other way to do it. later on i add tframe2 onto the main form.

  • 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-29T23:04:12+00:00Added an answer on May 29, 2026 at 11:04 pm

    Given the code you have shown, the only thing that could be going wrong is if you are setting the child frame’s Top property to a value that exceeds the Height property of its parent frame so that you would not see the child frame appear onscreen even though it does exist in memory.

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

Sidebar

Related Questions

I have a visual component that I built from a TFrame (but then registered
I am trying to wrap up a TFrame descendant as an ActiveX control, but
i have created a dll with tframe . how can i load it inside
I have a TForm (TVehicleEditForm) with 3 identical TFrames (TVehicleUnitFrame) inside. The idea was
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have you determined a maximum number of characters allowed in FCKEditor ? I seem
I have a native Delphi TFrame that emulates Roy Tanck's Cumulus Tag Cloud viewer,
Have following listener for keyboard ArrowDown event(it's key code is 40 ): window.onload =
Have converted devise new session from erb to Haml but doens't work, this is
I have the following code, and for the life of me, I cannot understand

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.