RAD Studio |  |

Updating the Object
See Also
Collapse All

Add code to the UpdateObject method to update the property when the user changes the controls on the property page. You must add code to the UpdateObject method in order to set the properties of the ActiveX control to their new values.

You use the OleObject property to access the ActiveX control.

For example, the following code sets the EditMask property of the ActiveX control using the value in the property page's edit box control (InputMask):

Copy Code

    procedure TPropertyPage1.UpdateObject;
    begin
       {Update OleObject from your control }
       OleObject.EditMask := InputMask.Text;
    end;

Copy Code

    void __fastcall TPropertyPage1::UpdateObject(void)
    {
      // Update OleObject from your control
      OleObject.OlePropertySet<WideString>("EditMask", WideString(InputMast->Text).Copy());
    }

See Also

Creating a Property Page for an ActiveX Control

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