I want to remove focus on Combo Box after item selected. How to do it? I set properties of myCombo as follows:
myCombo.DrawMode=OwnerDrawFixed and myCombo.DropDownStyle=DropDownList
Code as follows:
void SetComboReadOnly(object sender, DrawItemEventArgs e)
{
if (e.Index > -1)
{
e.DrawBackground();
e.Graphics.DrawString(((ComboBox)sender).Items[e.Index].ToString(), this.Font, Brushes.Black, e.Bounds);
e.DrawFocusRectangle();
}
}
void myCombo_DrawItem(object sender, DrawItemEventArgs e)
{
SetComboReadOnly(sender, e);
}