title: How do I make programmatic changes to a TComboBox play well with LiveBindings?
body: <p>I have a form that has two combo boxes, both of which contain the same list of items, and need to remain perfectly in sync with one another.  (They represent the same list of options on two different tabs of a <code>TPageControl</code>.)</p>
  
  <p>To make this work, I set up a LiveBinding to bind both controls to the same field of a ClientDataset that exists for no other purpose than to keep controls on this form synchronized.  My <code>TBindingsList</code> has a <code>TLinkControlToField</code> for both combo boxes, linking them both to the same field.</p>
  
  <p>Everything works fine, as long as I make all changes within the GUI.</p>
  
  <p>However, if an unrelated action changes the selection state of one of the boxes, they get out of sync:</p>
  
  <pre><code>cboMainValue.Items.InsertObject(0, 'ALL', TObject(-1));
  cboAltValue.Items.Clear;
  cboAltValue.Items.Assign(cboMainValue.Items);
  cboMainValue.ItemIndex := 0;
  cboAltValue.ItemIndex := 0;
  </code></pre>
  
  <p>After this point, for whatever reason, <code>cboMainValue</code> shows the expected text, while <code>cboAltValue</code> remains blank (ie <code>ItemIndex = -1</code>).</p>
  
  <p>I've tried setting the <code>Text</code> property rather than <code>ItemIndex</code>, and editing the value of the backing field on the ClientDataset, but none of these produces a different result.</p>
  
  <p>Does anyone know how to programmatically change the state of one combo box and make the LiveBindings update the other one to match it?</p>