title: How to update or refresh comboBox item with button.add_click function in PowerShell?
body: <p>I use a <code>ComboBox</code> to get a directory.  I need to update the directory by using the <code>Button.Click</code> event.</p>
  
  <pre class="lang-bsh prettyprint-override"><code>Add-Type -AssemblyName System.Windows.Forms
  [System.Windows.Forms.Application]::EnableVisualStyles()
  
  $Form                            = New-Object system.Windows.Forms.Form
  $Form.ClientSize                 = '400,400'
  $Form.TopMost                    = $false
  
  $ComboBox1                       = New-Object system.Windows.Forms.ComboBox
  $ComboBox1.width                 = 100
  $ComboBox1.height                = 20
  $ComboBox1.location              = New-Object System.Drawing.Point(36,60)
  $ComboBox1.Font                  = 'Microsoft Sans Serif,10'
  $list = @(Get-ChildItem -Directory ".\").Name
  foreach ($lst in $list) {
      $ComboBox1.Items.Add($lst)
  }
  $Button1                         = New-Object system.Windows.Forms.Button
  $Button1.text                    = "update"
  $Button1.width                   = 60
  $Button1.height                  = 30
  $Button1.location                = New-Object System.Drawing.Point(182,60)
  $Button1.Font                    = 'Microsoft Sans Serif,10'
  $Button1.Add_Click({
  })
  
  $Form.controls.AddRange(@($ComboBox1,$Button1))
  $Form.ShowDialog()
  </code></pre>