<pre>private void cmbGroupPractice_DrawItem(object sender, DrawItemEventArgs e) { if (e.Index == -1) { return; } //user mouse is hovering over this drop-down item, update its data if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) { // this tooltip simply shows the displayed text to the right of the drop-down box, customize as needed //toolTip1.Show(cmbGroupPractice.Items[e.Index].ToString(), cmbGroupPractice, e.Bounds.Right - 100 + e.Bounds.Height, e.Bounds.Top + e.Bounds.Width - 100); toolTip1.Show(cmbGroupPractice.Items[e.Index].ToString(), cmbGroupPractice, e.Bounds.Right - 100 + e.Bounds.Height, e.Bounds.Top + e.Bounds.Width - 100); } e.DrawBackground(); // draw text strings e.Graphics.DrawString( cmbGroupPractice.Items[e.Index].ToString(), e.Font, Brushes.Black, new Point(e.Bounds.X, e.Bounds.Y)); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)