问个 Treeview 背景色的问题,
我用下面的代码设置 TreeView 的背景色,但出现一片白色空白,
Dim lngStyle As Long lngStyle = GetWindowLong(tvwRptList.hWnd, GWL_STYLE) Call SetWindowLong(tvwRptList.hWnd, GWL_STYLE, lngStyle - TVS_HASLINES) Call SetWindowLong(tvwRptList.hWnd, GWL_STYLE, lngStyle) '½Úµã Dim i As Long For i = 1 To tvwRptList.Nodes.count tvwRptList.Nodes(i).BackColor = mTreeBackColor 'RGB(255, 0, 0) 'mTreeBackColor tvwRptList.Nodes(i).EnsureVisible Next i Call SendMessage(tvwRptList.hWnd, TVM_SETBKCOLOR, 0, ByVal mTreeBackColor)