   ______________269

,   Panell  ,  16, -
 :

Accept = Source->Control != Panel6;

 Accept   true    ,   -
  Panel6.         -
  OnGetSiteInfo.      -
,       .  -
  OnGetSiteInfo     
  , ..  ,       
  .       -
,         .    -
  OnDockOver,      -
     ,     .   
   ,      ,   
   .       -
  OnGetSiteInfo,      .  -
 OnDockOver     , ,  -
   ,       , , 
 ,   .

  Source  TDragDockObject   Do-
ckRect  TRect,   .    .
,   ,   15     Micro-
soft Office,          
      ,  ,   
   DockSite  true,   
OnDockOver  :

int x = ClientOrigin.x;

int  = ClientOrigin.y;

if (Source->Control == PanelS)
{
if (Source->DockRect-Left <= x)

Source->DockRect = Rect(x,y,x+25,y+ClientHeight);

else if (Source->DockRect.Right >= x+ClientWidth)

Source->DockRect = Rect(x+ClientWidth-25,y,x+ClientWidth,y+

ClientHeight) ;

else if (Source->DockRect.Top <= y)

Source->DockRect = Rect(x,y,x+ClientWidth,y+25);

else if (Source->DockRect.Bottom >= y+ClientHeight)

Source->DockRect = Rect(x,y+ClientHeight-25,x+ClientWidth,y+

ClientHeight);

else Source->DockRect = Rect(Source->DockRect .'Left,Source->

DockRect.Top, Source->DockRect.Left+100,
Source->DockRect.Top+100) ;

   x         Y,    
 ,        -
. A ClientWidth  ClientHeight        .

     15     
  ,      
,     25.       -
    100.

  ,   -  OnDockDrop.
         -
.    OnDragDrop   Drag&Drop. 
   :