Mick said:
The only .Net book that I have ever used was '.Net Windows Forms Custom
Controls'. ISBN: 0-672-32333-8
I couldn't say how that compares with other books, but it only briefly
goes into Designers. I really only used the book to help convert my
existing VBClassic coding skills to .Net.
If I can't find an answer or a hint within Google Groups then I generally
get direction via the help files or the MSDN Library and then just play
until it works. This is the most satisfying way to do it, but it can also
be quite stressful.
I probably spend far too much time on the PC programming, and not enough
down the pub ;-)
You're welcome.
Hello Mick, don't know if you're still following this thread but here
goes, I have my class working very well now in the IDE, what I would like
to be able to do is control the "Name" it is given at design time - it's
not a huge issue but would save some time renaming, no matter what I try
my TabPages are always "Named" e.g. PJKBaseTabPage1 etc..., my OnAddPage()
is as shown below, the "Text" property takes the new value but the "Name"
doesn't , any ideas ?, thanks
void OnAddPage(Object sender, EventArgs e)
{
PJKBaseTabControl ParentControl = (PJKBaseTabControl)Control;
System.Windows.Forms.Control.ControlCollection oldTabs =
ParentControl.Controls;
RaiseComponentChanging(TypeDescriptor.GetProperties(ParentControl)["TabPages"]);
PJKBaseTabPage P =
(PJKBaseTabPage)(DesignerHost.CreateComponent(typeof(PJKBaseTabPage)));
int NewPageNumber = ParentControl.TabCount + 1;
string PageName = "Page " + NewPageNumber.ToString();
P.Text = PageName;
ParentControl.TabPages.Add(P);
RaiseComponentChanged(TypeDescriptor.GetProperties(ParentControl)["TabPages"],
oldTabs, ParentControl.TabPages);
ParentControl.TabPages[NewPageNumber - 1].Name =
PageName.Remove(PageName.LastIndexOf(" "), 1);
ParentControl.SelectedTab = P;
SetVerbs();
}