RAD Studio
ContentsIndex
PreviousUpNext
Updating the Object

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):

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

 

void __fastcall TPropertyPage1::UpdateObject(void)
{
  // Update OleObject from your control
  OleObject.OlePropertySet<WideString>("EditMask", WideString(InputMast->Text).Copy());
}
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!