title: Facing issue when changed the Combobox items back color
body: <p>I have requirement as, change of back color for some of combobox's items.</p>
  
  <p>To achieve this, I have done following stuff:</p>
  
  <pre><code>  Private Sub cbo_DrawItem(sender As Object, e As DrawItemEventArgs) Handles cboRooms.DrawItem
      Try
  
          If e.Index = 0 Then
              e.DrawBackground()
  
              ' Get the item text    
              Dim text As String = DirectCast(sender, ComboBox).Items(e.Index).ToString()
              Dim brush As Brush
  
              brush = Brushes.Black
              e.Graphics.DrawString(text, (DirectCast(sender, Control)).Font, brush, e.Bounds.X, e.Bounds.Y)
          Else
  
              If (e.Index &gt; 0 AndAlso DirectCast(sender, ComboBox).Items(e.Index) IsNot Nothing) Then
  
  
                  ' Draw the background 
                  e.DrawBackground()
                  Dim combo As ComboBox = DirectCast(sender, ComboBox)
                  ' Get the item text    
                  Dim text As String = combo.Items(e.Index).ToString()
                  Dim brush As Brush
  
  
  
  
                  If (DirectCast(DirectCast(sender, ComboBox).Items(e.Index), GenericListItem(Of objName)).Value.IsExists) Then
                      brush = Brushes.Yellow
                      e.Graphics.FillRectangle(brush, e.Bounds)
                      e.Graphics.DrawString(text, (DirectCast(sender, Control)).Font, Brushes.Black, e.Bounds.X, e.Bounds.Y)
                  Else
                      brush = Brushes.Black
                      e.Graphics.DrawString(text, (DirectCast(sender, Control)).Font, brush, e.Bounds.X, e.Bounds.Y)
  
                  End If
                  ' Determine the forecolor based on whether or not the item is selected    
                  'If (e.Index = combo.SelectedIndex) Then
  
                  '    brush = Brushes.White
                  '    'e.Graphics.FillRectangle(brush, e.Bounds)
                  '    e.Graphics.DrawString(text, (DirectCast(sender, Control)).Font, brush, e.Bounds.X, e.Bounds.Y)
                  'End If
  
  
                  ' Draw the text    
  
              End If
          End If
      Catch ex As Exception
  
        End Try
  </code></pre>
  
  <p>Problem:</p>
  
  <p>I able to get back color as Yellow through above stuff. But, when I do select/mouse over any item then, its fore color does not change to white and it remains black as it is . so, unable to read the combobox item clearly due to highlighted color(mouseover/selected item) is blue.</p>
  
  <p>Also, over the items where back color is changed, there is no effect while I do mouse over/select the item, it just appear in yellow back color only and no focus color applied.</p>
  
  <p>Can any one give me solution for above points?</p>
  
  <p>Thank You</p>