帮助上说, RightClickSelect affects only the value of the Selected property. It does not cause the tree view to highlight a new node if the node is selected using the right mouse button自己写吧,在TTreeView的MouseUp或其MouseDown事件中: procedure TForm1.TreeView1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button = mbRight then if TreeView1.GetNodeAt(X, Y) <> nil then TreeView1.GetNodeAt(X, Y).Selected := true; end;
RightClickSelect affects only the value of the Selected property.
It does not cause the tree view to highlight a new node if the node is
selected using the right mouse button自己写吧,在TTreeView的MouseUp或其MouseDown事件中:
procedure TForm1.TreeView1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = mbRight then
if TreeView1.GetNodeAt(X, Y) <> nil then
TreeView1.GetNodeAt(X, Y).Selected := true;
end;