title: Use of CheckedChanged using Windows Forms and Powershell assistance
body: <p>I'm using WinForms with PowerShell.  In my tool, I'd like a checkbox that when checked, will display a message next to it, and when unchecked, it will remove the message.</p>
  
  <p>I've gotten this far (I'm sure there's a much better way to do it).  This makes the message pop-up, but it doesn't go away when you uncheck the box.  Any help would be appreciated.  Thanks!</p>
  
  <pre><code>$Checkbox_Errors.Add_CheckStateChanged({   ### Checkbox_Errors is the name of the checkbox
  if ($Checkbox_Errors.Checked -eq $true)
  {
  $ErrorWarning1 = New-Object System.Windows.Forms.Label
  $ErrorWarning1.Text = "WARNING: May take 3-5 Minutes"  ### When checked, this is what it should display
  $ErrorWarning1.ForeColor = "Red"
  $ErrorWarning1.AutoSize = $True
  $ErrorWarning1.Location = new-object System.Drawing.Point(170,13)
  $groupbox.Controls.Add($ErrorWarning1)
  }
  
  })
  
  
  $Checkbox_Errors.Add_CheckStateChanged({
  if ($Checkbox_Errors.Unchecked -eq $true)
  {
  $ErrorWarning1 = New-Object System.Windows.Forms.Label
  $ErrorWarning1.Text = "" ### I attempted this, where it would re-write
  $ErrorWarning1.ForeColor = "Red"
  $ErrorWarning1.AutoSize = $True
  $ErrorWarning1.Location = new-object System.Drawing.Point(170,13)
  $groupbox.Controls.Add($ErrorWarning1)
  }
  
  })
  </code></pre>