public void Drawitem(object sender, DrawItemEventArgs e) { if (e.Index < 0) { return; } e.DrawBackground(); e.DrawFocusRectangle(); var _with12 = e.Graphics; _with12.SmoothingMode = SmoothingMode.HighQuality; _with12.PixelOffsetMode = PixelOffsetMode.HighQuality; _with12.InterpolationMode = InterpolationMode.HighQualityBicubic; _with12.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; if (String.Compare(e.State.ToString(), "Selected,") > 0) { _with12.FillRectangle(new SolidBrush(_BaseColour), new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)); _with12.DrawLine(new Pen(_BorderColour), e.Bounds.X, e.Bounds.Y + e.Bounds.Height, e.Bounds.Width, e.Bounds.Y + e.Bounds.Height); _with12.DrawString(" " + ListB.GetItemText(Items[e.Index]), new Font("Segoe UI", 9, FontStyle.Bold), new SolidBrush(_TextColour), e.Bounds.X, e.Bounds.Y + 2); } else { _with12.FillRectangle(new SolidBrush(_BaseColour), new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)); _with12.DrawString(" " + ListB.GetItemText(Items[e.Index]), new Font("Segoe UI", 8), new SolidBrush(_TextColour), e.Bounds.X, e.Bounds.Y + 2); } _with12.Dispose(); }