Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Add 8 items to the combo
Me.UltraComboEditor1.Items.Add(1, "One")
Me.UltraComboEditor1.Items.Add(2, "Two")
Me.UltraComboEditor1.Items.Add(3, "Three")
Me.UltraComboEditor1.Items.Add(4, "Four")
Me.UltraComboEditor1.Items.Add(5, "Five")
Me.UltraComboEditor1.Items.Add(6, "Six")
Me.UltraComboEditor1.Items.Add(7, "Seven")
Me.UltraComboEditor1.Items.Add(8, "Eight")
' This combo should always be in edit mode,
Me.UltraComboEditor1.AlwaysInEditMode = True
' Turn on auto-complete for Internet Explorer type auto completion
Me.UltraComboEditor1.AutoComplete = True
' Office XP look and feel.
Me.UltraComboEditor1.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.OfficeXP
' Assign a shared image and forecolor to each element.
Me.UltraComboEditor1.ItemAppearance.Image = Me.Icon.ToBitmap()
Me.UltraComboEditor1.ImageTransparentColor = Color.FromArgb(192, 192, 192)
Me.UltraComboEditor1.ItemAppearance.ForeColor = Color.White
' Assign individual backColors to each element
Dim baseColorIndex As Integer = 255 / Me.UltraComboEditor1.Items.Count
Dim i As Integer
For i = 0 To Me.UltraComboEditor1.Items.Count - 1
Me.UltraComboEditor1.Items(i).Appearance.BackColor = Color.FromArgb(100, 100, baseColorIndex + (baseColorIndex * i))
Next i
Me.UltraComboEditor1.MaxDropDownItems = 6
Me.UltraComboEditor1.HasMRUList = True
Me.UltraComboEditor1.SelectedIndex = 3
Me.UltraComboEditor1.SortStyle = Infragistics.Win.ValueListSortStyle.DescendingByValue
End Sub