OK ... here's my question - how can i force a control property that is a collection to save?
Control properties are normally saved automatically in .Net, however consider this circumstance:
Now when we add the control to a form and edit the "Attached Controls" property, the property does not save.Code:'Add a control to a new windows forms application 'In the class tags of the new control put the following: Public Class clsAttachedControlItem Public Enum AttachedControlDataSource FromControl FromRecordset FromList End Enum Dim ph_Control As Control Public Property Control() As Control Get Control = ph_Control End Get Set(ByVal value As Control) ph_Control = value End Set End Property Dim ph_GetDataFrom As AttachedControlDataSource Public Property GetDataFrom() As AttachedControlDataSource Get GetDataFrom = ph_GetDataFrom End Get Set(ByVal value As AttachedControlDataSource) ph_GetDataFrom = value End Set End Property End Class Private ph_AttachedControls As List(Of clsAttachedControlItem) <System.ComponentModel.DisplayName("Attached Controls")> _ Public Property AttachedControls() As List(Of clsAttachedControlItem) Get AttachedControls = ph_AttachedControls End Get Set(ByVal value As List(Of clsAttachedControlItem)) ph_AttachedControls = value End Set End Property
Any help is appreciated,
Thanks in advance,
Kris Bennett




Code Project - "Best VB.NET article of October 2011"
on the left <--)
Reply With Quote