title: C# access Textbox of parent form from Listview control class
body: <p>I created custom Listview and for usage I need to access Textbox on same Form where Listview is. Currently what I do everywhere in my Listview code is this:</p>
  
  <pre><code> Form frm = FindForm();
   var text_ctl = frm.Controls.Find("Textbox1", true).FirstOrDefault() as Control;
   TextBox Txt = (TextBox)text_ctl;
  
    ...
    Txt.Text="Test";
  </code></pre>
  
  <p>But instead of repeating same code over and over I want to do It only once, like in OnCreateControl() and pass that reference to everywhere I need It in my Listview class. What is the easiest or most elegant solution for this ? Thanks for help in advance !</p>