In the 1.1 world, you'd create a component w/a property decorated w/the
"ProvidePropertyAttribute", and you might also implement the
IExtenderProvider interface.  Probably it's similar in the 2.0 world
(which I assume you're in, as I don't recognize the TableLayoutPanel
type).  Hopefully a troll through the help docs and/or google will put
you on the scent.

HTH,

-Roy 

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Gregory Miley
Sent: Monday, July 17, 2006 12:40 PM
To: [email protected]
Subject: [ADVANCED-DOTNET] Adding properties to child controls?

I'm looking for some information on adding properties to child controls
similar to the way that TableLayoutPanel adds Cell, Column, Row,
ColumnSpan, and RowSpan to its child Controls.  I would assume this is
possible since it is being done already.(?)

Basically, what I want is to add a bool property to controls added to a
form (the forms will be derived from a custom base form class). This
property will be used to determine if the control has a user-defined
default. I figured this would be a good way to handle it since a lot of
our forms use classes that dynamically generate their content based on
data in SQL tables, yet there can still be standard windows forms
controls mixed in that may or may not qualify as having user definable
default values.

I've tried a couple hacky ways to emulate it but end up on the reverse
end of the success stick. Anyone have any suggestions as to how I could
do this?

Thanks for any information.


Greg

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to