0
var currentTxt = (RichTextBox)TabControl_Query
  .SelectedTab
  .Controls
  .Find("RTX" + TabControl_Query.SelectedTab.TabIndex, true)
  .FirstOrDefault();

I am using a BackgroundWorker, also my Tabcontrol is dynamic so i can add new ones with a click (not static), i can use the example below on some physical existent Textboxes, labels, grids and whatever

TXT_SearchResults.Invoke((MethodInvoker)(() => TXT_SearchResults.Visible = true));

Now i can add new tabs without an issue but when i run the text inside the tab that contains a dynamic RichTextBox i will have the issue Program Shot

I get the following exception

Exception

Yazzan
  • 1
  • 1
  • 1
    Please do not put text content in an image - an exception's content is just text, so please put it in the question (and not in a comment either). – Matt Hogan-Jones May 14 '18 at 08:53
  • the issue was my upload was restricted due to the network i am connected to, fixed the img(s) – Yazzan May 14 '18 at 09:14

0 Answers0