M
Mark Olbert
Could someone please explain to me why InitializeComponent() code like the following:
//
// giver_rec
//
this.Controls.Add(this.dbFrameworkTextBox1);
this.Controls.Add(this.tbxAddress);
this.Controls.Add(this.tbxGiverName);
this.Name = "giver_rec";
this.SqlDataPackageType = typeof(Test.Component2);
this.TableName = "giver";
and properties defined as follows (for the class being initialized):
[
Category("SqlDataPackage"),
Editor(typeof(TableUIEditor), typeof(UITypeEditor)),
]
public string TableName
{
get { return tblName; }
set { tblName = value; }
}
[
Category("SqlDataPackage"),
Editor(typeof(SqlDataPackageUIEditor), typeof(UITypeEditor)),
]
public Type SqlDataPackageType
{
get { return dataPkgType; }
set { dataPkgType = value; }
}
Results in ONLY the SqlDataPackageType property being set when the component comes up in the
VSIDE???? I can watch SqlDataPackageType_set being called in the debugger, but the corresponding
TableName_set method NEVER gets called!
Does the component initialization process dislike strings or something?????
BTW, since Microsoft apparently firmly believes that custom component design shouldn't be
documented, does anyone have any 3rd party books they can recommend on Windows.Forms custom
control/component development?
- Mark
//
// giver_rec
//
this.Controls.Add(this.dbFrameworkTextBox1);
this.Controls.Add(this.tbxAddress);
this.Controls.Add(this.tbxGiverName);
this.Name = "giver_rec";
this.SqlDataPackageType = typeof(Test.Component2);
this.TableName = "giver";
and properties defined as follows (for the class being initialized):
[
Category("SqlDataPackage"),
Editor(typeof(TableUIEditor), typeof(UITypeEditor)),
]
public string TableName
{
get { return tblName; }
set { tblName = value; }
}
[
Category("SqlDataPackage"),
Editor(typeof(SqlDataPackageUIEditor), typeof(UITypeEditor)),
]
public Type SqlDataPackageType
{
get { return dataPkgType; }
set { dataPkgType = value; }
}
Results in ONLY the SqlDataPackageType property being set when the component comes up in the
VSIDE???? I can watch SqlDataPackageType_set being called in the debugger, but the corresponding
TableName_set method NEVER gets called!
Does the component initialization process dislike strings or something?????
BTW, since Microsoft apparently firmly believes that custom component design shouldn't be
documented, does anyone have any 3rd party books they can recommend on Windows.Forms custom
control/component development?
- Mark