E
epederiva
Hi,
i have a base control MyButton inherit from System.Windows.Forms.Button
and i want to use it in all my application, this control set some properties
like Font, FlatStyle etc from a configuration file. I put this control in a
control library, then create a driver (test) project. In test project i add
a new form, and then from Toolbox "My user controls" a drag MyButton over
the new form. It works all perfectly.
But if i change a property of MyButtun (base class) (ex. ForeColor or
BackColor or Font), etc... from my configuration file, the childButton
(inherit from MyButton) doesn't change.
It is due to "Windows Form Designer" that in InitializeComponent, when i
drag the chil control over the form, add some code and set properties.
Is there any solotion for this problem?
How implement visual inheritance corretly?
Thanks in advance,
sorry for my english.
epederiva
i have a base control MyButton inherit from System.Windows.Forms.Button
and i want to use it in all my application, this control set some properties
like Font, FlatStyle etc from a configuration file. I put this control in a
control library, then create a driver (test) project. In test project i add
a new form, and then from Toolbox "My user controls" a drag MyButton over
the new form. It works all perfectly.
But if i change a property of MyButtun (base class) (ex. ForeColor or
BackColor or Font), etc... from my configuration file, the childButton
(inherit from MyButton) doesn't change.
It is due to "Windows Form Designer" that in InitializeComponent, when i
drag the chil control over the form, add some code and set properties.
Is there any solotion for this problem?
How implement visual inheritance corretly?
Thanks in advance,
sorry for my english.
epederiva