RAD Studio |  |

Setting the Property Value

The property editor's SetValue method takes a string typed by the user in the Object Inspector, converts it into the appropriate type, and sets the value of the property. If the string does not represent a proper value for the property, SetValue should throw an exception and not use the improper value.

To read string values into properties, override the property editor's SetValue method.

SetValue should convert the string and validate the value before calling one of the Set methods.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!