Ignore:
Timestamp:
Mar 8, 2011, 1:57:42 PM (14 years ago)
Author:
george
Message:
  • Added: Customization of layouts in "Customize docking" window.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCoolDockLayout.pas

    r179 r180  
    11unit UCoolDockLayout;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
    66
    77uses
    8   Classes, SysUtils, FileUtil, Contnrs, URectangle, UCoolDocking, Forms,
     8  Classes, SysUtils, FileUtil, Contnrs, URectangle, Forms, UCoolDockCommon,
    99  DOM, XMLWrite, XMLRead;
    1010
     
    5252    procedure SaveToFile(FileName: string);
    5353    procedure PopulateStringList(List: TStrings);
     54    function FindByName(Name: string): TCoolDockLayout;
    5455    constructor Create(AOwner: TComponent); override;
    5556    destructor Destroy; override;
     
    171172  for I := 0 to Items.Count - 1 do
    172173    List.AddObject(TCoolDockLayout(Items[I]).Name, TCoolDockLayout(Items[I]));
     174end;
     175
     176function TCoolDockLayoutList.FindByName(Name: string): TCoolDockLayout;
     177var
     178  I: Integer;
     179begin
     180  I := 0;
     181  while (I < Items.Count) and (TCoolDockLayout(Items[I]).Name <> Name) do Inc(I);
     182  if I < Items.Count then Result := TCoolDockLayout(Items[I]) else Result := nil;
    173183end;
    174184
Note: See TracChangeset for help on using the changeset viewer.