Rob Kennedy wrote:

>SF wrote:
>  
>
>>I was used to use AlTop alignement of panels in the main form and the 
>>zone is well restricted. But i would like to use custom alignement. But 
>>doing that, the MDI Child are displayed behind the alCustom aligned 
>>panels(or frames). Do you have an idea on how to restrict the zone ?
>>    
>>
>
>Put one big panel aligned to the top, and then align all your other 
>panels inside of it.
>
>  
>
Thanks for your help.
But i have also a Left Aligned Panel.
If i let Delphi align priorities the result is :



------------
|  MyFrame |
|----------|
|  |       |
|  |  mdi  |
|  | child |
|  | zone  |
|  |       |
------------

And what i would like is :


------------
|  |       |
|  |-------|
|  |       |
|  |  mdi  |
|  | child |
|  | zone  |
|  |       |
------------

In order to do that i am acutally overriding AlignControls method of the 
main form :

//**********************************************************************************
// Align Controls After Display in order to adjust all Frames.
procedure TMainForm.alignControls(AControl : TControl; var ARect:TRect);
begin
     inherited alignControls(AControl, ARect);

     if (MyFrame1<>nil) then
     begin
          if MyFrame1.Visible then
          begin
             MyFrame1.Left := LeftPanel.Width;
             MyFrame1.width := self.Width - LeftPanel.Width - 
self.BorderWidth - 10;
             MyFrame1.top := ToolBar1.Height + ToolBar2.Height;
          end;
     end;
end;

****************************************************************************************

This works bt cause display blinking, it is first aligned to the left 
border and then replaced where i wanted.

if i try not to call the inherited alignControls when i 
AControl=MyFrame1 then MDI Child appear below MyFrame1 !

I am not sure to be very clear. But if you have an help i would appreciate

Regards
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to