ich habe ein Formular, daß verschiedene Optionen zur Verfügung stellt. Dieses Formular soll wahlweise standalone oder als Subform in anderen Formularen verwendbar sein.
Das klappt eigentlich auch ausser, daß sich dessen Controls während es als Subform fungiert nicht mit der Maus fokussieren lassen. Mit Tab geht es.
Beispiel (Neues Projekt + zwei ganz normale Formulare. Form1 hat zwei Edit Controls, Form2 hat ein EditControl und folgender Quellcode in unit1.pas
Code: Alles auswählen
implementation
uses unit2;
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormShow(Sender: TObject);
begin
if Form2 = nil then
begin
Form2 := TForm2.Create(Application);
Form2.Show();
Form2.Parent := self;
Form2.Left := width - Form2.Width;
Form2.Top := 0;
end;
end;
end.