Jump to content

MDIChild with panel on top


Jaume

Recommended Posts

Hi,

 

In the demo "uniGUI\Demos\MDI Forms" if you put a panel or ToolBar with align onTop on the MainForm, the two MDIChild forms are created on top of the panel, and it is not visible.

 

This not happens on pure Delphi VCL. If you have a panel on a MDIFOrm all the MDIChilds are created on the remaining space.

 

Is there in trick to achive this behaviour? I've tried ReCalculateAligns but doesn't work.

 

Thank you.

Link to comment
Share on other sites

Also, if you resize the MDIForm the maximized MDIChild remains unresized.

 

So you get a small MDIForm with big MDIChild that remains outside of his parent. 

 

Don't know if this must be considered a bug and posted in the bug forum with example?

Link to comment
Share on other sites

Also, if you resize the MDIForm the maximized MDIChild remains unresized.

 

So you get a small MDIForm with big MDIChild that remains outside of his parent. 

 

Don't know if this must be considered a bug and posted in the bug forum with example?

 

I had this problem with frames.

 

I have put on the UniFrameCreate:

 

align := alClient;

 

I believe you could try the same thing on form, I have am also intercepting the OnResize on the main form and going thru all the frames (in your case forms) and forcing them to align := alNone and then align := alClient

 

Not sure this is the best, but with the lack of documentation I have tried this and worked for me

 

I have created a standard Frame that all the frames inherit from. You could do the same for  your MDIChild and in the base form you create a public resize procedure that will be called by your main MDI form, going thru all the current opened MDI Childs and calling this resize, where  you do what said before.

 

Eduardo

Link to comment
Share on other sites

Another issue.

 

If you have this Form creation:  Form1 (fsNormal) -> creates Form2 (MDIForm) -> creates Form3 (MDIChild).

 

Then Form3 is created without being inside of Form2, it's not a real child of his creator.

 

I think that if MDIForm/MDIChild it's possible then it should be working as real form -> child.

 

Thank you

Link to comment
Share on other sites

My temporary solution for this last problem is this one:

 

on the UniEvents beforeInit() of the Form 3:

 

function window.beforeInit(sender)
{     
   sender.constrain = true;
   sender.constrainTo = Form2.form.uform.getEl();
   sender.renderTo = Form2.form.uform.getEl(); 
}

 

This makes the Form3 to be MDIChild of the Form 2.

 

Other resize problems still happen, but at least this makes the MDIChild inside the MDIForm all the time, even after resize the MDIForm.

 

With UNIGui MDIChild if you risize the MDIForm, sometimes MDIChild can be outside of MDIForm.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...