CAN I PUT A FORM INSIDE A FORM INSIDE A FORM

Go down

CAN I PUT A FORM INSIDE A FORM INSIDE A FORM

· #1

I HAVE A FORM. I WANT ANOTHER FORM IN IT. AND THEN ANOTHER FORM IN THAT ONE

HOW DEEP DOES IT GO

SORRY ABOUT THE CAPS

Re: CAN I PUT A FORM INSIDE A FORM INSIDE A FORM

· #2

Deeper than you have monitor for.

Re: CAN I PUT A FORM INSIDE A FORM INSIDE A FORM

· #3

It is allowed, which surprises people. A form is a control, so it can have a parent:

pascal
Inner := TInnerForm.Create(Self);
Inner.Parent := HostPanel;
Inner.BorderStyle := bsNone;
Inner.Align := alClient;
Inner.Show;

That embeds one form in a panel of another. You can repeat it.

But what you almost certainly want is a TFrame. A frame is a reusable piece of a form, designed like a form, dropped onto forms like a component. It was built for exactly this, and it doesn't drag a title bar and a taskbar entry along.

Read the error message. Then read it again.

Re: CAN I PUT A FORM INSIDE A FORM INSIDE A FORM

· #4

I DID IT FOUR LEVELS DEEP

the innermost form is 12 pixels wide. it has an ok button. i cannot click it. sorry

SORRY ABOUT THE CAPS

Re: CAN I PUT A FORM INSIDE A FORM INSIDE A FORM

· #5

Somewhere in there is a very small dialog asking a very small question.

Pete · thirty years of begin and end "It compiled on my machine."

Re: CAN I PUT A FORM INSIDE A FORM INSIDE A FORM

· #6

It's forms all the way down. Use a frame. Locking this before someone tries five.

Forum rules 1 to 10 apply. Yes, to you.

Go up

Sign in to reply