Delphi components save their property values only if those values differ from the defaults. If you do not specify otherwise, Delphi assumes a property has no default value, meaning the component always stores the property, whatever its value.
To specify a default value for a property, add the default directive and the new default value to the end of the property declaration.
You can also specify a default value when re-declaring a property. In fact, one reason to re-declare a property is to designate a different default value.
__property Alignment = {default=taCenter};
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|