mardi 21 avril 2015

How to use onPaint on Custom Combobox?

Due to some constrains, I am in a position to create custom-combobox with which add a dot at right to it (while it load to the form). This can be label with filled color.

I try to use OnPaint event, it is not help me to achieve it.

Protected Overrides Sub OnPaint(e As PaintEventArgs)
    MyBase.OnPaint(e)

    ' Create Label as per specification

    ' Add label to the parent of the combo-box
    Me.Parent.Controls.Add(lableControl)
End Sub

I may miss something here.. It may be very simple. But it swallows my time. I appreciate, suppose you have any other idea to achieve this. Thank you.

Aucun commentaire:

Enregistrer un commentaire