Both your requests are possible. It depends on what you want to do. If you want to be able to write your code in the program separately for each subitem you need to create three extra published properties of your component and map them to your corresponding subcomponent properties. Like this (shown for one subcomponent only - repeat for the other 2):
type
TMyPanelForm1 = class( TPanel )
private
fLabel1, fLabel2 : TLabel;
fImage : TImage;
procedure SetLabel1DblClick(const Value: TNotifyEvent);
function GetLabel1DblClick: TNotifyEvent;
public
constructor Create(AOwner: TComponent); override;
published
property OnLabel1DblClick : TNotifyEvent
read GetLabel1DblClick write SetLabel1DblClick;
end;
...
function TMyPanelForm1.GetLabel1DblClick: TNotifyEvent;
begin
Result := fLabel1.OnDblClick;
end;
procedure TMyPanelForm1.SetLabel1DblClick(const Value: TNotifyEvent);
begin
fLabel1.OnDblClick := Value;
end;
On the other hand, if you want the control to act like a unified control, where all three subcontrols 'inherit' the main component double click, you just ripple down assignments like this:
TMyPanelForm2 = class( TPanel )
private
fLabel1, fLabel2 : TLabel;
fImage : TImage;
function GetOnDblClick: TNotifyEvent;
procedure SetOnDblClick(const Value: TNotifyEvent);
public
constructor Create(AOwner: TComponent); override;
published
property OnDblClick : TNotifyEvent
read GetOnDblClick write SetOnDblClick;
end;
...
function TMyPanelForm2.GetOnDblClick: TNotifyEvent;
begin
Result := inherited OnDblClick;
end;
procedure TMyPanelForm2.SetOnDblClick(const Value: TNotifyEvent);
begin
inherited OnDblClick := Value;
fLabel1.OnDblClick := Value;
fLabel2.OnDblClick := Value;
fImage.OnDblClick := Value;
end;
Other solutions are possible too.