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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:50:58+00:00 2026-06-15T18:50:58+00:00

In Lazarus I’m trying this: TabSaveButton := TButton.Create(nil); with TabSaveButton do begin Parent:=NewTab; Width:=75;

  • 0

In Lazarus I’m trying this:

TabSaveButton := TButton.Create(nil);
with TabSaveButton do
  begin
    Parent:=NewTab;
    Width:=75;
    Height:= 25;
    Top:=530;
    Left:=715;
    Caption:='Save';
  end;

And it works. I.e., I get the button and it’s clickable, and it is the child of a dynamically created tab sheet.

But the following does not show the button, nor errors:

TabSaveButton := TButton.Create(NewTab);
with TabSaveButton do
  begin
    Width:=75;
    Height:= 25;
    Top:=530;
    Left:=715;
    Caption:='Save';
  end;
  1. Why does the second method not work?

  2. Is this the same effect on both Lazarus and Delphi?

  • 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-06-15T18:50:59+00:00Added an answer on June 15, 2026 at 6:50 pm

    The argument of Create sets the owner of the control. The owner is the component responsible for freeing the component in question. For instance, if you free a component, then all components owned by it are also freed. The parent is a completely different thing. It is the window (control) hosting the control in question.

    There is no difference between Delphi and Lazarus here.

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

Sidebar

Related Questions

I'm trying to create my first application with Lazarus Pascal and PostgreSQL. The pg
I am trying to create dynamic TTabSheets for my program. Written in FPC/Lazarus being
I'm trying to connect to my postgresql database using Lazarus pascal. I get this
When Lazarus on Ubuntu 12.04 starts, I get this error (screen shot attached). Does
I need to read XML data into lazarus, in order to present this data
I am trying to learn Free Pascal using Lazarus and one of my pet
I am porting a Delphi application to FPC/Lazarus and this application shows info in
I'm trying to compile a Delphi project in Free Pascal Lazarus and get compiler
I'm trying out a very simple program in LAZARUS to multiply two text box
I have searched all over for this. In Delphi/Lazarus, given a position, I want

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.