响应ReadProperties和WriteProperty事件,如: Private Sub UserControl_ReadProperties(PropBag As PropertyBag) Text1.text = PropBag.ReadProperty("text", "") '读取属性值 End SubPrivate Sub UserControl_WriteProperties(PropBag As PropertyBag) PropBag.WriteProperty "text", Text1.text, "" '保存属性值 End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Text1.text = PropBag.ReadProperty("text", "") '读取属性值
End SubPrivate Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "text", Text1.text, "" '保存属性值
End Sub
Text1.text = PropBag.ReadProperty("text", "") '读取属性值
改成
Text1.text = PropBag.ReadProperty("text", Ambient.DisplayName) '读取属性值然后在下面要把要引用Text1.text属性的自定义控件的值,变成Text1.text的值