Solved

Creating Twins Panels

Posted on 2002-06-13
10
137 Views
Last Modified: 2010-04-04
Hello,

I have a panel with Componets in it.

I want to be able to create X numbers of panels in the same from that will have the same Properties and Componets in it.
0
Comment
Question by:S_Warrior
10 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7075639
place your panel on a tframe,
create this tframe so often you want
0
 

Author Comment

by:S_Warrior
ID: 7075689
TFrame?
what is TFrame?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7075693
what delphi version do you use?
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Author Comment

by:S_Warrior
ID: 7075702
Is there any functions that create new panels?
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 7075743
var t : tpanel;
begin
  for loopvar := 0 to panelsneeded do
  begin
    t := tpanel.create(self);
    t.parent := self;
    t.align := altop;
    t.height := 50;
      // here you could create the controls
      // on your panel like
    with tedit.create(self) do
    begin
      parent := t;
      left := 10;
      top := 10;
      width := 100;
    end;
    with tbutton.create(self) do
    begin
      parent := 1;
      left := 120;
      top := 10;
      width := 100;
      caption := '&Press me';
      onclick := MyPreDefinedOnClickProcedure;
    end;
    t.show;
  end;
end;

just from head

meikl ;-)
0
 
LVL 4

Expert Comment

by:nestorua
ID: 7076301
HI,
If you need it only in the "Design Time" you can do the following:
1.Select your Panel with those Components;
2.Copy it to Clipboard;
3.Paste the content of the Clipboard whatever number of times (in your notations - X) you want.
Sincerely,
Nestorua.
0
 

Author Comment

by:S_Warrior
ID: 7077550
No, I didnt meant to this.

I Already have a Panel that I create in Design Time,

Now at runtime I want to create copys of this panel, so it will have all the Events and Proper of the Org Panel.
0
 
LVL 2

Expert Comment

by:mikepj
ID: 7082774
kretzmar (spelling?) is right use a TFrame; they're great for what you're trying to do.
0
 

Author Comment

by:S_Warrior
ID: 7086914
I dont want to use TFrame I want to know how to copy Component with all of his properties, this is what I want to know.

in this case the Component is TPanel
0
 

Author Comment

by:S_Warrior
ID: 7153873
I want to close this question
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi: how to send PJL commands to printer 3 100
Delphi 2 60
Delphi inherited method 6 70
Sending files from  idTcpServer Socket to idTcpClient 2 40
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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