Hi there,
I have built a custom control with its own designer (ControlA). One of the properties for this control is a text string that can hold the ID of another control that implements specific behavior (ControlB).
I created my own TypeConverter that returns an ArrayList with the specific control IDs of type ControlB in the GetStandardValues method. The IDs are retrieved by looping through the controls on the current page (at design-time).
So, when I drag a new instance of my ControlA on the page, the property grid now shows a drop-down list with the IDs of the controls of type ControlB on the page. So far so good.
However, when I add a new instance of ControlB to the page, the drop-down list for ControlA is not updated to show the new ControlB. This makes sense, as ControlA is not aware of this new instance.
Is there a way to catch an event on the main page whenever it has changed? ControlA could subscribe to that event, and update the drop-down with the new instance of ControlB?
I think the validator controls work like that. Whenever I drag a new text box on the page, the ControlToValidate property is updated. Any ideas how I can simulate this behavior??
Thanks in advance,
Imar
Imar Spaanjaars
http://Imar.Spaanjaars.Com/
===============================================
Everyone is unique, except for me.