// text colour private void tvwEquip_DrawText(object sender, DrawEventArgs e) { e.TextBrush = new SolidBrush(Color.FromArgb(224, 224, 224)); // default forecolor if (sender == tvwEquipTxtName) { return; } EquipNode node = (EquipNode)e.Node.Tag; int col = -1; if (sender == tvwEquipTxtNum1) { col = 1; } else if (sender == tvwEquipTxtNum2) { col = 2; } else if (sender == tvwEquipTxtNum3) { col = 3; } else if (sender == tvwEquipTxtNum4) { col = 4; } else if (sender == tvwEquipTxtNum5) { col = 5; } if (node.GetColValue(col) == "-") { e.TextBrush = new SolidBrush(Color.FromArgb(128, 128, 128)); } else { e.TextBrush = new SolidBrush(Color.FromArgb(224, 224, 224)); } int cycle = node.GetColCycle(col); if (cycle >= 0 && cycle == node.CurrentCycle) { e.BackgroundBrush = new SolidBrush(Color.FromArgb(80, 80, 80)); } }