Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Components Writing > Problem with co...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 139 of 155
Post > Topic >>

Problem with component containing component

by "Mateusz [PEYN] Adamus" <peyn.bezspamu@[EMAIL PROTECTED] > Oct 10, 2005 at 10:44 AM

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 :-( 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 
:-( It would be really great if you could make some tutorial source code 
for me.

TIA

best regards
Mateusz [PEYN] Adamus
 




 1 Posts in Topic:
Problem with component containing component
"Mateusz [PEYN] Adam  2005-10-10 10:44:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:41:20 CDT 2008.