hello everybody
my problem is how to make a ComboBox that displays either a series of color samples or a list of images
or how to make a ComboBox that displays a series of images with associated text.
i've made one but
icons in my combobox are not like i want
here is my code and result
Private Sub ComboBox1_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ComboBox1.DrawItem
If (e.Index <> -1) Then
e.Graphics.DrawImage(ImageList1.Images(e.Index), e.Bounds.Left, e.Bounds.Top)
e.Graphics.DrawString(Me.ComboBox1.Items(e.Index).ToString(), e.Font, System.Drawing.Brushes.Black, e.Bounds.Left + ImageList1.Images(e.Index).Width, e.Bounds.Top)
End If
End Sub
thank you