Solved

Adding page to TPageControl (runtime !)

Posted on 1998-08-31
1
446 Views
Last Modified: 2008-02-01
I'm looking for a way to add a page to a TPageControl at runtime.
This is Delphi 3 !
0
Comment
Question by:webers
1 Comment
 
LVL 7

Accepted Solution

by:
BlackMan earned 100 total points
ID: 1338251
From the D4 help (should be ok for D3 also)..

const
  TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', 'Parts' );
var
  i: integer;
  PageControl1: TPageControl;
begin
  PageControl1 := TPageControl.Create(Self);
  PageControl1.Parent := Self;
  PageControl1.Align := alClient;
  for i := Low(TabTitles) to High(TabTitles) do
    with TTabSheet.Create(PageControl1) do

    begin
      PageControl := PageControl1;
      Name := 'ts' + TabTitles[i];
      Caption := TabTitles[i];
   end;

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
URL for downloading Google Chrome for Win XP 2 232
tidtcpserver connection lost handle 2 109
Adoquery sql  left join does not work 25 103
How to convert memory stream to PDF file 6 169
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question