Reputation: 171
On my MDI Form (Parent Form), whenever I trigger a command to create a new MDI Child Form, I do these stuff (but it doesn't work):
procedure TfrmMDI.CreateChildForm(const childName: string);
var Child: TfrmChild;
begin
Child := TfrmChild.Create(Application);
Child.Caption := childName;
Child.BorderStyle := bsNone;
end;
I tried to set the Border Style of the MDI Child Form to bsNone through object inspector but it doesn't work as well.
I finally tried to set the MDI Child's Form BorderStyle through run-time however, it doesn't seemed to work too.
procedure TfrmChild.FormCreate(Sender: TObject);
begin
BorderStyle := bsNone;
end;
For additional information, my current MDI Child Form looks like this:
We may want to set our MDI Child's BS like this MDI Parent's BS:
Upvotes: 0
Views: 2328
Reputation: 171
Upon waiting for some answers, I have read a documentation from Embarcadero that states:
"Changing the border style of an MDI child form to bsDialog or bsNone has no effect"
I tried to change the Application Appearance of my program to some pre-installed styles created by Embarcadero and It helped.
I just override the default style setting of my project.
Finally, it looks like this. Any border style changes will be applied to your MDI Child Form if you override the default form style:
Upvotes: -1
Reputation: 596352
What you are attempting to do is not how MDI is meant to be used. The GUI you want to have would likely be better served by using client-aligned TFrame
objects instead of MDI child forms.
Upvotes: 2