示例#1
0
 private void listBox1_DrawItem(object sender, DrawItemEventArgs e)
 {
     e.DrawBackground();
     if (-1 != e.Index)
     {
         string test  = ((CharacterObject)((ListBox)sender).Items[e.Index]).ToString();
         string test2 = e.ToString();
         e.Graphics.DrawString(test, e.Font, new SolidBrush(e.ForeColor), e.Bounds);
     }
     e.DrawFocusRectangle();
 }