home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / delphi / kompon / d3456 / SQLSET.ZIP / D3-5 / SQLSTREG.PAS
Pascal/Delphi Source File  |  2001-05-20  |  735b  |  40 lines

  1. unit SqlStreg;
  2.  
  3. interface
  4.  
  5. uses
  6.   Dsgnintf, Classes, Dialogs;
  7.                                    
  8. procedure Register;
  9.  
  10. implementation
  11.  
  12. Uses
  13.   SQLSet, SQLsEdit;
  14.  
  15. type
  16.   TSQLItemsProperty = class(TClassProperty)
  17.   public
  18.     procedure Edit; override;
  19.     function GetAttributes: TPropertyAttributes; override;
  20.   end;
  21.  
  22. procedure TSQLItemsProperty.Edit;
  23. begin
  24.   if EditSQLItems(GetComponent(0) as TSQLSet) then Modified;
  25. end;
  26.  
  27. function TSQLItemsProperty.GetAttributes: TPropertyAttributes;
  28. begin
  29.   Result := [paDialog, paReadOnly];
  30. end;
  31.  
  32. procedure Register;
  33. begin
  34.   RegisterComponents('AnsiPars', [TSQLSet]);
  35.   RegisterPropertyEditor(TypeInfo(TSQLItems), TSQLSet, '', TSQLItemsProperty);
  36. end;
  37.  
  38. end.
  39.  
  40.