|
Grouping the controls on the form
The controls on the designed form can be grouped by the AddControl event. For instance, if you have the edit and the label above the edit and want to move them together, just use the follow code.
procedure TForm1.FormDesigner1AddControl(Sender: TObject;
TheControl: TControl);
begin
with FormDesigner1 do
begin
if TheControl=Label1 then AddControl(Edit1);
if TheControl=Edit1 then AddControl(Label1);
end;
end;
|