title: Inno Setup disable component selection when a specific component is selected
body: <p>I would like to be able to disable the selection of a component based on a specific component being selected. I cannot do this through nesting of components, as the component needs to be selectable on it's own, but not if another specific component is selected. Currently I handle this using the <code>NextButtonClick</code> event displaying a message:</p>
  
  <pre><code>if IsComponentSelected('Client') and IsComponentSelected('Sync') then
    begin
      MsgBox('A Client installation cannot have the Synchronisation component selected.',
        mbError, MB_OK);
        Result := False;      
    end;
  </code></pre>
  
  <p>which prevents the user from continuing until they deselect the incompatible combination. However, it would be far more elegant if I could simply disable the selection of the component rather than displaying a message:</p>
  
  <pre><code>if CurPageID = wpSelectComponents then
    begin
      if IsComponentSelected('Client') then
        begin
          WizardForm.ComponentsList.Checked[15] := False;
          WizardForm.ComponentsList.ItemEnabled[15] := False;
        end
      else
        begin
          WizardForm.ComponentsList.ItemEnabled[15] := True;
        end;
    end;
  </code></pre>
  
  <p>The problem is there doesn't seem to be an event that allows this to change dynamically as the user selects or deselects components. Is there an event I can place this code in or another way to do this?</p>