0

I am creating an application which makes use of several TTabsheets (from the TPageControl component). Is it possible to prevent a component (in this case a tab) from being created during the program startup? I want to manually create the tabs at a later stage.

This is not a dynamic component. It was created in the Delphi 2010 IDE.

Thanks!

Marnu123
  • 77
  • 2
  • 10

1 Answers1

1

If you include components in the designer, then they will be created when the form is created. Nothing you can do to stop that.

The logical conclusion is that you need to create the components at run time. One obvious way to make that easier is to put the components on a frame and create that at run time. That will allow you to group related components and do the visual design and property specification at design time, but then postpone creation until you know you need them.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Thank you very much David! I shall give the frame a try. – Marnu123 Jun 11 '15 at 13:08
  • Frankly that's a better approach than the answer you accepted here: http://stackoverflow.com/questions/27188910/how-to-dynamically-create-customized-tabsheet-runtime – David Heffernan Jun 11 '15 at 13:09
  • I see what you are saying. The problem I had was the extensive amount of code that has to be written to create a component when the whole component/layout is already designed. I only have a couple of weeks to finish this school project. – Marnu123 Jun 11 '15 at 13:16