IntfColSel.pas
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit IntfColSel;
  2. interface
  3. uses
  4.   Graphics, Contnrs;
  5. type
  6.   IColorSelect = interface
  7.   ['{3F961395-71F6-4822-BD02-3B475FF516D4}']
  8.     function Display (Modal: Boolean = True): Boolean;
  9.     procedure SetSelColor (Col: TColor);
  10.     function GetSelColor: TColor;
  11.     property SelColor: TColor
  12.       read GetSelColor write SetSelColor;
  13.   end;
  14. procedure RegisterColorSelect (AClass: TClass);
  15. var
  16.   ClassesColorSelect: TClassList;
  17. implementation
  18. procedure RegisterColorSelect (AClass: TClass);
  19. begin
  20.   if ClassesColorSelect.IndexOf (AClass) < 0 then
  21.     ClassesColorSelect.Add (AClass);
  22. end;
  23. initialization
  24.   ClassesColorSelect := TClassList.Create;
  25. finalization
  26.   ClassesColorSelect.Free;
  27. end.