private void varLabelBox_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); if (varLabelBox.Items.Count > 0) { VarLabel ds = (VarLabel)varLabelBox.Items[e.Index]; Brush itemBrush = Brushes.Black; StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Near; sf.LineAlignment = StringAlignment.Center; e.Graphics.DrawString(ds.ToString(), e.Font, itemBrush, varLabelBox.GetItemRectangle(e.Index), sf); } e.DrawFocusRectangle(); }