Delpi RzTreeView1控件 节点颜色设置
Procedure Tfrm_SysDepasManager.RzTreeView1AdvancedCustomDrawItem(
Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState;
Stage: TCustomDrawStage; Var PaintImages, DefaultDraw: Boolean);
Var
ACanvas: TCanvas;
ARect: TRect;
Begin
Inherited;
ACanvas := RzTreeView1.Canvas;
ARect := Node.DisplayRect(True);
If node.Selected Then
ACanvas.Brush.Color := clSkyBlue;
ACanvas.Font.Assign(RzTreeView1.Font);
ACanvas.FillRect(ARect);
DrawText(ACanvas.Handle, PChar(Node.Text), -1,
ARect, DT_SINGLELINE Or DT_VCENTER Or DT_SINGLELINE);
End;