S
Steve Thackery
Sorry if this is a silly question, but I'm struggling with what is probably
really simple, if I could but see it.
As a learning exercise I'm writing a simple text editor, which has a tab
control to allow editing of multiple text files. Each TabPage should have a
RichTextBox on it. When I create a new TabPage, I want to place a
RichTextBox on it.
I can create a new TabPage easily enough using:
{
TabPage myTabPage = new TabPage("");
tabControl1.TabPages.Add(myTabPage);
}
I can also create a new RichTextBox in code, but for the life of my I can't
see how to create (or place) the new RichTextBox onto the newly created Tab
Page.
In other words, how do I create one object "on" or "in" another?
I'm sorry if this is really simple, but I have puzzled over this for ages,
and would really appreciate some guidance from someone more experienced!
Thanks in advance,
Thack
really simple, if I could but see it.
As a learning exercise I'm writing a simple text editor, which has a tab
control to allow editing of multiple text files. Each TabPage should have a
RichTextBox on it. When I create a new TabPage, I want to place a
RichTextBox on it.
I can create a new TabPage easily enough using:
{
TabPage myTabPage = new TabPage("");
tabControl1.TabPages.Add(myTabPage);
}
I can also create a new RichTextBox in code, but for the life of my I can't
see how to create (or place) the new RichTextBox onto the newly created Tab
Page.
In other words, how do I create one object "on" or "in" another?
I'm sorry if this is really simple, but I have puzzled over this for ages,
and would really appreciate some guidance from someone more experienced!
Thanks in advance,
Thack