| Mateusz [PEYN] Adamus 2005-10-07, 7:02 pm |
| Hi.
I'm creating my own component, nothing much, just to panels, one put on
another.
I've created my custom constructor:
constructor TMyPanel.Create( aOwner: TComponent );
begin
inherited Create( aOwner );
FInnerPanel := TPanel.Create( self );
FInnerPanel.Parent := self;
FInnerPanel.Align := alRight;
FInnerPanel.BevelOuter := bvNone;
FInnerPanel.Caption := 'InnerPanel';
DoubleBuffered := True;
end;
As you can see I create second panel and put it on the "main" component.
(component inherites from TPanel).
Everything works fine until I try to make project with MyPanel. I put
MyPanel on form, get nice view of panel with another panel in it. But
now I'd like to put some other components in this inner panel - I can't
do it :-( I put components on it, and it looks like they are in it but
when I look at object tree view I can see that components are put on
form, not on InnerPanel :-(
When I move them to MyPanel they are put on main panel of MyPanel - not
on inner one.
I think I have to make somehow delphi to see inner panel - so it would
be shown in object tree view. How can I do such thing?
TIA
Best regards
Mateusz [PEYN] Adamus
|