|
-
Aug 20th, 2005, 11:43 AM
#1
Thread Starter
Supreme User
[DELPHI] - Simple MDI Problem! [RESOLVED]
So simple i feel sad asking 
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
Last edited by Madboy; Aug 20th, 2005 at 02:07 PM.
-
Aug 20th, 2005, 02:02 PM
#2
Thread Starter
Supreme User
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;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|