解决方案 »

  1.   

    procedure TForm1.FormCreate(Sender: TObject);
    begin
      RzGroup1.Items.Clear;
      RzGroup1.Items.Add.Caption := 'Item0';
      with RzGroup1.Items.Add do
      begin
        Caption := 'Item1';
        IndentLevel:=1;
        Visible := False
      end;
      RzGroup1.Items[0].OnClick := RzGroup1Items0Click;
    end;procedure TForm1.RzGroup1Items0Click(Sender: TObject);
    begin
      RzGroup1.Items[1].Visible := not RzGroup1.Items[1].Visible;
    end;
      

  2.   


    我把RzGroup的属性ShowItemSelection 设为true; ......怎么对RzGroup的属性ShowItemSelection 进行释放?每次我点击item;再次点击就没有反应了?  如图:
      

  3.   

    procedure TForm1.FormCreate(Sender: TObject);
    begin
      RzGroup1.ShowItemSelection := True;
      RzGroup1.Items.Clear;
      RzGroup1.Items.Add.Caption := 'Item0';
      with RzGroup1.Items.Add do
      begin
        Caption := 'Item1';
        IndentLevel:=1;
        Visible := False
      end;
      RzGroup1.OnMouseDown := RzGroup1MouseDown
    end;procedure TForm1.RzGroup1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    var
      Item: Integer;
    begin
      Item := RzGroup1.ItemAtPos(Point(X,Y));
      if Item = 0 then
      begin
        RzGroup1.Items[0].Selected := True;
        RzGroup1.Items[1].Visible := not RzGroup1.Items[1].Visible;
      end
    end;
      

  4.   

    http://bbs.csdn.net/topics/390897401?page=1#post-398308741  求指教?