BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with component containing component

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing
View previous topic :: View next topic  
Author Message
Mateusz [PEYN] Adamus
Guest





PostPosted: Mon Oct 10, 2005 12:44 pm    Post subject: Problem with component containing component Reply with quote



Hi

I'm writing really simple (doesn't look that way anymore) component.

I want to create a panel with another panel in it.

Main panel is MyPanel and inner panel is just InnerPanel.

OK. So i started with creating new component which inherits from TPanel.

Then I overidden constructor and added code creating the InnerPanel

<delphi>

FInnerPanel := TPanel.Create( self );
FInnerPanel.Parent := self;
FInnerPanel.Align := alTop;
FInnerPanel.Caption := 'InnerPanel1';

</delphi>

OK, I installed it and put MyPanel on my form in some test project.
Everything looked great - I had panel with my InnerPanel.

But then I tried to put some other components on my InnerPanel and hit
the wall. I can't put components on it Sad It looks like delphi doesn't
even know that there is panel inside MyPanel.

So, my question is: How can I change MyPanel so that Delphi would see
InnerPanel?

I know it can be done 'couse there is PageControl, it has TabSheets in
it and Delphi sees them.

On another group someone told me to use DefineProperties procedures. So
I looked on google and found something but I can't make any thing of it
Sad It would be really great if you could make some tutorial source code
for me.

TIA

best regards
Mateusz [PEYN] Adamus
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.