加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

RzGroupBar

发布时间:2020-12-15 07:52:45 所属栏目:Java 来源:网络整理
导读:何分多层 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.

何分多层

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;
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;
View Code

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;
View Code

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读