TreeView中的RightClickSelect属性是不是没有用啊?
我设置为True以后,用右键点击树上的结点时,其TreeView1.Selected这个结点并没有发生变化啊

解决方案 »

  1.   

    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.
    只设置tv1.Selected的Value,不产生Highlight。
      

  2.   

    这个帮助里面的说法我也看到了。
    我不是说右键会产生高亮,而是右键点击后,treeview.selected这个结点也没有发生变化啊。而按帮助里说的,treeview.selected这个结点应该会发生变化的
      

  3.   

    procedure TForm1.TreeView1MouseDown(Sender: TObject;
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    begin
    if ssRight in Shift then
      if TreeView1.GetNodeAt(X, Y)<>nil then TreeView1.GetNodeAt(X, Y).Selected:=True;
    end;
      

  4.   

    to  smiler007(笑一笑) :
    你说的办法挺好用。
    可是你的这个办法和RightClickSelect这个属性的值没有任何关系的啊。也就是说RightClickSelect这个属性没什么用?呵呵
      

  5.   

    在TreeView中rightclickselect 不足以达到你的要求
      

  6.   

    “在TreeView中rightclickselect 不足以达到你的要求”?
    我的要求就是右键点击时和左键一样选中结点,rightclickselect这个属性不是做这个事情的?