I am writing a component that consists of many properties that should appear in the Delphi IDE object inspector (published properties) ...
type
TMyComponent = class(TComponent)
private
FMyProperty: String;
published
property MyProperty: String read FMyProperty write SetMyProperty default 'Something';
end;
However, this does not allow me to apply the default value to the string property ...
[DCC Error] MyUnit.pas(278): E2146 Default values must be of ordinal, pointer or small set type
All other properties by default work fine (Integer, Enum, etc.).
My goal is to A) not save string properties in DFM if they are the default value, and B) show the value in the Object Inspector as Bold if it is not the default, and correct if. There are over 130 properties that are displayed for this component, and about 50 of them are string properties, some of which have fairly large default values.
string ? Delphi , ?
, , Inno Setup /. Setup, 100 . , 20 , , DFM ( ). , , Inno Setup script.