Doh.  Fixed it (typo in registration proc).


----- Original Message -----
From: Peter G Jones <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, January 13, 2000 5:21 AM
Subject: [DUG]: NBG String property editor


> I have the following property editor that doesn't want to do anything.
It's
> supposed to populate a list that will display as a drop down in the object
> inspector but I can't figure out whats wrong.  Can anyone else see it?
>
>
>   TPGJFieldNameProperty = class(TStringProperty)
>   public
>     function GetAttributes: TPropertyAttributes; override;
>     procedure GetValues(Proc: TGetStrProc); override;
>     function GetValue : String; override;
>     procedure SetValue(const Value : String); override;
>   end;
>
> function TPGJFieldNameProperty.GetAttributes: TPropertyAttributes;
> begin
>   Result := [paValueList];
> end;
>
> procedure TPGJFieldNameProperty.GetValues(Proc: TGetStrProc);
> var
>   i : Integer;
> begin
>   Proc('Field 1');
>   Proc('Field 2');
> end;
>
> procedure Register;
> begin
>   RegisterComponents('PGJ', [TPGJSimpleReport]);
>   RegisterPropertyEditor(TypeInfo(string),
>     TPGJSimpleReport, 'FieldName', TPGJFieldNameProperty);
> end;
>
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to