Delphi custom TPanel component


I have a custom component based on a TPanel. The aim is to display at the top, a so called "title area", wich displays a caption and has customizable border and background color. It works fine, except for a little issue: at design time, when clicking on the "title area",
the component is not selected (blue bullets doesn't appear), meaning that I can't drag or modify the component's properties. If I click outside the "title area", the component is selected. Can anyone have enter image description herea solution for this? Thanks in advance. Follows a brief descriptive image:

Best Solution

For the title panel set (e.g.):

constructor TMyTitlePanel.Create(AOwner: TComponent);
  inherited Create(AOwner);
  ControlStyle := ControlStyle - [csAcceptsControls] + [csNoDesignVisible];

Another option is to use SetSubComponent(True) for the title panel:

Related Question