RAD Studio
ContentsIndex
PreviousUpNext
Modifying the Component Object

Once you have created a new component class, you can modify it in almost any way. In this case, you will change only the initial value of one property in the memo component. This involves two small changes to the component class:

  • Overriding the constructor.
  • Specifying the new default property value.
The constructor actually sets the value of the property. The default tells Delphi what values to store in the form (.dfm for VCL applications ) file. Delphi stores only values that differ from the default, so it is important to perform both steps.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!