Hi Kira,
Thanks for your reply and sorry for my late respons!
No, my scenario is different: I inherit from 'Component' and Implement 'IExtenderProvider'.
Inherits System.ComponentModel.Component
Implements IExtenderProvider
My ExtenderControl manages all data-entry controls on the form and also buttons, ToolBars, etc...
So there can be tens of ComboBoxes in the ExtenderControls' HashTable.
Right before added the Extended Control to the Hashtable, I lookup some properties like this:
' Creates a new collection and assign it the properties for the Extendee.
Dim properties As PropertyDescriptorCollection = TypeDescriptor.GetProperties(extendee)
' Sets an PropertyDescriptor to the specific property.
Dim myProperty As PropertyDescriptor = properties.Find("LimitToList", False)
Dim LimitToList As Boolean = False
Boolean.TryParse(myProperty.GetValue(extendee), LimitToList)
ProvidedProperties.LimitToList = LimitToList
But the problem here seems to be that the Extendee has not a true reference to the control on the form, so all it's properties will always be the Default Value.
I use the GetPropertyName / SetPropertyName / ShouldSerializePropertyName to pass the Control to the Hashtable.
I'm pretty much sure I'm doing something wrong somewhere because it doesn't seem logical to me.
TIA,
Michael