[DELPHI] - Simple MDI Problem! [RESOLVED]
So simple i feel sad asking :blush:
Basically ive not done much MDI programming before in Delphi, and my question goes like:
If i create a new child form, i want the child caption to say "Child 1", then if i create another document it will say "Child 2", "Child 3" etc.
Here is what ive got so far:
procedure TfrmMain.NewFile;
var
FormCount: LongInt;
begin
TfrmEdit.Create(self);
TfrmEdit(ActiveMDIChild).Caption:= 'Child ' + intTostr(FormCount + 1);
end;
But each new child shows Child 1 as the caption
Re: [DELPHI] - Simple MDI Problem!
The logic is simple now i realised:
procedure TfrmMain.NewFile;
var
NewForm: TfrmEdit;
begin
NewForm:= TfrmEdit.Create(Self);
NewForm.Caption:= 'Child ' + intTostr(MDIChildCount);
end;