Madboy
Aug 20th, 2005, 12:43 PM
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
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