Changeset 42


Ignore:
Timestamp:
Sep 16, 2010, 10:18:35 AM (14 years ago)
Author:
george
Message:
  • Opraveno: Překreslování při odebírání a přidávání.
Location:
DockManager/Lazarus
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • DockManager/Lazarus/Demo

    • Property svn:ignore
      •  

        old new  
        11lib
         2Demo.exe
  • DockManager/Lazarus/Demo/UMainForm.lfm

    r41 r42  
    2020  end
    2121  object Panel1: TPanel
    22     Left = 20
    23     Height = 179
    24     Top = 45
    25     Width = 292
     22    Left = 0
     23    Height = 200
     24    Top = 40
     25    Width = 320
     26    Align = alBottom
    2627    Anchors = [akTop, akLeft, akRight, akBottom]
     28    BevelOuter = bvNone
    2729    DockSite = True
    2830    TabOrder = 1
  • DockManager/Lazarus/UCustomDockManager.pas

    r41 r42  
    9191  R: TRect;
    9292begin
    93   for I := 0 to FDockSite.ControlCount - 1 do
    94           begin
    95             Control := FDockSite.Controls[I];
    96             if Control.Visible and (Control.HostDockSite = FDockSite) then
    97             begin
    98               R := Control.BoundsRect;
    99               //Control.SetBounds(0, GrabberSize, FDockSite.Width - Control.Left,
    100               //  FDockSite.Height - Control.Top);
    101               //Canvas.FillRect(R);
    102               DrawGrabber(FDockPanel.Canvas, Control);
    103             end;
    104           end;
     93  CloseButton.Visible := FDockSite.DockClientCount > 0;
     94  for I := 0 to FDockSite.DockClientCount - 1 do begin
     95    Control := FDockSite.DockClients[I];
     96    if Control.Visible and (Control.HostDockSite = FDockSite) then
     97    begin
     98      R := Control.BoundsRect;
     99      //Control.SetBounds(0, GrabberSize, FDockSite.Width - Control.Left,
     100      //  FDockSite.Height - Control.Top);
     101      //Canvas.FillRect(R);
     102      DrawGrabber(FDockPanel.Canvas, Control);
     103    end;
     104  end;
    105105end;
    106106
     
    168168begin
    169169  inherited InsertControl(ADockObject);
     170  FDockPanel.Repaint;
    170171end;
    171172
     
    173174  DropCtl: TControl);
    174175begin
     176  inherited;
    175177end;
    176178
     
    239241procedure TCustomDockManager.RemoveControl(Control: TControl);
    240242begin
     243  inherited;
     244  //FDockPanel.Invalidate;
     245  FDockSite.Invalidate;
    241246end;
    242247
Note: See TracChangeset for help on using the changeset viewer.