i have
...
TDispPitch = class
private
iLineSize: Integer;
iLineColor: TColor;
bDisplayAccent: Boolean;
bVisible: Boolean;
published
property LineSize : Integer read iLineSize write iLineSize;
...etc
end;
...
and i wanted this feature shown in Object Insepector to edit the settings.
i try adding
property DispPitch: TDispPitch read FDispPitch write FDispPitch. like
the DispPitch can be shown but i cannot see its properties. like LineSize, LineColor etc.
The class needs to derive from
TPersistent
, and should implement the Assign() (or AssignTo()) method, as well as expose anOnChange
event so the containing class can react to changes, eg:Then you use it like this:
You must derive your class from
TPersistent
, or a descendant, in order to make it available in the Object Inspector:From Delphi Documentation: