Hello! In short, I make a text editor with tabs (so that on one tab you can work with one file, on the other - with another). There is a code to add new tabs and generate new TextBox on them.
tabControl1.TabPages.Add(p); TextBox textbox = new TextBox(); p.Controls.Add(textbox); But there was a problem - I do not know how to access the textbox in the active tab. For example, this is how I access the active tab: tabControl1.SelectedTab, and how can I get to the textbox to save / print / clear text from the textbox on the active tab?