[CODE]System.Drawing.Graphics labelGraphics = this.label1.CreateGraphics();
string[] drawString = { "A", "B", "C", "D", "E", "F", "G" };
System.Drawing.Font DrawFont = new System.Drawing.Font("Arial", 16);
float x = 1 ;
float y = 1;
System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat();
System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Red);
for (int i = 0; i < drawString.Length; i++)
{
if (i % 2 == 0)
{
drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Red);
}
else
{
drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Yellow);
}
labelGraphics.DrawString(drawString[i], DrawFont, drawBrush, x+i*16 , y, drawFormat);
drawBrush.Dispose();
}
DrawFont.Dispose();
labelGraphics.Dispose();[/CODE]
就用这个代码就行了