with ... do //开域语句
Canvas//画布
Canvas.Brush//底图with MyTreeView.Canvas do
begin
{}Brush.Color := m_BkgColorDialog.Color; //相当于MyTreeView.Canvas.Brush.Color := m_BkgColorDialog.Color;
{}FillRect(ARect); //相当于MyTreeView.Canvas.FillRect
end;