title: OpenCV (Python) order of added trackbars
body: <p>I'm building a track bar window with multiple sliders like so:</p>
  
  <pre class="lang-python prettyprint-override"><code>import cv2
  
  def do_nothing(_):
      pass
  
  # Create window and add track bars
  window_name = 'level control'
  cv2.namedWindow(window_name)
  
  for i in xrange(10):
      cv2.createTrackbar(str(i), window_name, 1, 10, do_nothing)
  
  # Wait for escape key
  while (True):
      k = cv2.waitKey() &amp; 0xff
      if k == 27:
          break
  </code></pre>
  
  <p>The trouble is that they are added in a really strange order:</p>
  
  <p><img src="https://i.stack.imgur.com/0WeJa.png" alt="enter image description here"></p>
  
  <p>I was trying to work out the pattern, so I added them one by one. At each step they look like:</p>
  
  <ul>
  <li>0</li>
  <li>0 1</li>
  <li>0 1 2</li>
  <li>3 1 2 0 &lt;- WHAT?</li>
  <li>3 1 4 2 0</li>
  <li>3 1 4 2 0 5</li>
  <li>3 4 0 5 1 6 2</li>
  </ul>
  
  <p>I can't figure out the pattern, but it's the same every time, so it's not random! Also the order that I add them in doesn't make a difference, so it seems to be based on the name. It's not alphabetical though, replacing the numbers with characters gives a similar order (e.g. <code>d b c a</code>). Is this a bug? Am I doing something funny? Is there a way to get my sliders to be in the order I want?</p>