treeview1.Nodes[0].ForeColor = Color.Red;
private void treeView1_DrawNode(object sender, DrawTreeNodeEventArgs e)
{
Color strColor;
if (e.Node.Index % 2 == 0) //判断结点
strColor = Color.Red;
else
strColor = Color.Blue;
e.Graphics.DrawString(e.Node.Text, this.Font, new SolidBrush(strColor), e.Bounds);
}
另设置:
this.treeView1.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawText;