B
Bart
Hi all,
Firts of all I am complete new to C# but I am trying to build a simple
texteditor.
So on my mainform I have a tabcontrol and each of the tabs contains a
RichTextBox. Now when the users selects another tab I want to get a
reference to the RichTextBox located on that tab.
Ive tried this:
private RichTextBox CurrentDocument = null;
..
..
..
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
CurrentDocument = tabControl1.TabPages[0].Controls[0];
}
but it doesn't work. Can someone help me out here ....
Thanks a lot in advance,
Bart
Firts of all I am complete new to C# but I am trying to build a simple
texteditor.
So on my mainform I have a tabcontrol and each of the tabs contains a
RichTextBox. Now when the users selects another tab I want to get a
reference to the RichTextBox located on that tab.
Ive tried this:
private RichTextBox CurrentDocument = null;
..
..
..
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
CurrentDocument = tabControl1.TabPages[0].Controls[0];
}
but it doesn't work. Can someone help me out here ....
Thanks a lot in advance,
Bart