Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to subclass control?
Message
From
22/04/2008 12:35:50
 
 
To
22/04/2008 12:20:20
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01184867
Message ID:
01312419
Views:
22
>I'm sorry to be so persisent about this, but I want to tell you that I made the class without the Get, Set and DefaultValue stuff, and it works just fine... When I change the font color or size in the class, and then re-build project and run the form, it comes out just like the class changes. No Get. No Set. No DefaultValue. It just works.
>
>Now, to see the changes in the form while in the IDE, you will have to close and re-open the form. But at any time, if I change the font in the class, the textbox on the form automatically updated to match the form, when you run it, or re-open it. Again, No Get. No Set. No DefaultValue.


No problem, Matt. Persistence is a good thing. =0)

OK, so now ... drag another TextBox to your Form in the IDE. Then go look at the designer-generated code and tell me what you see. All of a sudden, all those properties will now be showing up there. OK, well, that still looks ok ... until you go and change a property in your TextBox base class and now it will *not* be propagated into that Form. Try it, you'll see immediately what I mean. Sorry to be such a spoil-sport. <g>

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform