Solved

Creating Twins Panels

Posted on 2002-06-13
10
141 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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!

 

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

Independent Software Vendors: 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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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