RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWideCharProperty.SetValue Method (WideString)

Responds when the user changes the value of the property.

Pascal
procedure SetValue(const Value: WideString); override;
C++
virtual __fastcall SetValue(const BSTR Value);

Do not call SetValue. It is called automatically by the Object Inspector when the user has finished changing the property value. The SetValue method for TPropertyEditor does nothing. Descendant classes override SetValue to apply the value entered by the user (represented by the Value parameter) to all components that can be returned by the GetComponent method. 

For many property editors, SetValue need only translate the Value string into an appropriate value and call SetFloatValue, SetMethodValue, SetOrdValue, SetStrValue, or SetVarValue. For properties that do not correspond to a float, method, ordinal, string, or variant, however, SetValue must directly propagate the new value to every component and then call the Modified method. If the value can't be set, SetValue should raise an exception that describes the problem.

Note: If the property is changed only through a dialog brought up by the Edit method, SetValue need not be overridden.
 

 

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