inherited control

  • Thread starter Thread starter Krzysztof
  • Start date Start date
K

Krzysztof

Hi all
I got 2 UserControl. First with layout (grid + two buttons)
Secon is inerited control from this with layout, and I want to add to all
butons some functionality... but I dont see this buttons in design mode.
Why? What I do wrong?

Regards
Krzysztof
 
Hi,

These buttons could have been declared as "private". You should modify their
declarations to "protected". Still, this would have only prevented you from
attaching event handlers, the buttons themselves should have been displayed
anyway...
 
Hi,
These buttons could have been declared as "private". You should modify their
declarations to "protected". Still, this would have only prevented you from
attaching event handlers, the buttons themselves should have been displayed
anyway...
Mayby I do it wrong. To Add inherited control to solution I do : "add
inherited control", set name and set which control is "base" and save. And
now if I open conrtrol in design mode I got grey empty rectangle ...Horror

What with tis?
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
Regards
Krzysztof
 
Mayby I do it wrong. To Add inherited control to solution I do : "add
inherited control", set name and set which control is "base" and save. And
now if I open conrtrol in design mode I got grey empty rectangle ...Horror

What with tis?
I bet, that designer changed location of your buttons to 0, 0...
My advice: if you can- avoid visual inheritance- it is very usful, but VERY
VERY buggy in VS .NET
 
Does the parent control work at runtime correctly.
If you put it on a form and run the application will it display itself
correctly?

Krzysztof said:
Hi,

These buttons could have been declared as "private". You should modify their
declarations to "protected". Still, this would have only prevented you from
attaching event handlers, the buttons themselves should have been displayed
anyway...
Mayby I do it wrong. To Add inherited control to solution I do : "add
inherited control", set name and set which control is "base" and save. And
now if I open conrtrol in design mode I got grey empty rectangle ...Horror

What with tis?
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
Regards
Krzysztof
 
Back
Top