F
Fred Iannon
I am developing an inherited control (i.e. subclassed) and
I am having trouble figuring out how to set the default
values for BASE CLASS properties which appear in the
designer.
In other words with this definition:
public class MyTextBox :
System.Windows.Forms.TextBox
is there a way to make MyTextBox have the following
DEFAULT values in designer mode:
Enbaled = false;
Size = new Size(10, 15);
TabStop = false;
Typically, I would like to be allow the user to be able
change these value, however I want these to be the
defaults.
Furthermore, is there a way to hide a BASE class property
in the designer mode (so the user canNOT change it in
designer more, only in code??), or to at least make the
value NOT editable in designer mode (but still display
it)??
I know how to do all of this with my own properties in the
new control, however I canNOT figure out how to change
attributes on base classes properties....one idea was
placing code in the classes CTOR BEFORE the call to
InitializeComponenet, but that does not seem to work....
Thanks for any help,
Fred Iannon
I am having trouble figuring out how to set the default
values for BASE CLASS properties which appear in the
designer.
In other words with this definition:
public class MyTextBox :
System.Windows.Forms.TextBox
is there a way to make MyTextBox have the following
DEFAULT values in designer mode:
Enbaled = false;
Size = new Size(10, 15);
TabStop = false;
Typically, I would like to be allow the user to be able
change these value, however I want these to be the
defaults.
Furthermore, is there a way to hide a BASE class property
in the designer mode (so the user canNOT change it in
designer more, only in code??), or to at least make the
value NOT editable in designer mode (but still display
it)??
I know how to do all of this with my own properties in the
new control, however I canNOT figure out how to change
attributes on base classes properties....one idea was
placing code in the classes CTOR BEFORE the call to
InitializeComponenet, but that does not seem to work....
Thanks for any help,
Fred Iannon