title: How to change tab order or modify tab page collection in a winform form?
body: <p>So here is my scenario. I have a C# Winform application with a form that has 3 buttons. </p>
  
  <pre><code>Button A; //Default tabindex == 0
  Button B; //Default tabindex == 1
  Button C; //Default tabindex == 2
  </code></pre>
  
  <p>I programmatically create and add 3 more buttons to the form: D, E, and F. I then try the following</p>
  
  <pre><code>D.TabIndex = 1;
  E.TabIndex = 2;
  F.TabIndex = 3;
  B.TabIndex = 4;
  C.TabIndex = 5;
  </code></pre>
  
  <p>When I tab, it SHOULD go</p>
  
  <pre><code>A -&gt; D -&gt; E -&gt; F -&gt; B -&gt; C
  </code></pre>
  
  <p>The way it actually goes, when I run the application and tab through the controls, is</p>
  
  <pre><code>A -&gt; B -&gt; C -&gt; (some combination of D -&gt; E -&gt; F in whatever order I make them in)
  </code></pre>
  
  <p>I've googled the issue and keep coming up with answers that say things along the lines of "Just modify the form's tab page collection! Easy peasy!" but I can't actually find examples of how this is done. I've looked at the form's various methods and properties, but I didn't see any property that looked remotely close to being the tab page collection.</p>
  
  <p>So here I am. Does anyone know of a way to do this so that the buttons go A -> D -> E -> F -> B -> C when I add D, E and F programmatically at run time?</p>
  
  <p>Thank you!</p>