Solved

Creating Twins Panels

Posted on 2002-06-13
10
135 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
 

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now