I have my own control, derived from TCustomPanel
. It has a child (TEdit
) on it.
type
TMyControl = class(TCustomPanel)
private
FEditor: TEdit;
public
constructor Create(AOwner: TComponent);
destructor Destroy(); override;
end;
constructor TMyControl.Create(AOwner: TComponent);
begin
FEditor := TEdit.Create(nil);
FEditor.Parent := Self;
end;
destructor TMyControl.Destroy();
begin
FEditor.Free();
end;
When I click on a child control at design-time, it acts as the run-time TEdit
, capturing focus.
How to completely disable child controls at design time?
I want them to stop answering mouse/keyboard messages. When I click on them at design-time, I want the parent control to be selected and dragged.