zoukankan      html  css  js  c++  java
  • RzGroupBar

    何分多层

    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
  • 相关阅读:
    Python3.4 多线程
    OSG Win7 + VS2015 编译
    OSG-3.4.0 简要说明(Readme)
    Boost 1.62.0 编译参数
    VS2015 + QT5.7 中文的坑
    C++库编译
    osg学习笔记3 简单几何模型
    Sqlserver 创建账号
    nginx检查报错:nginx: [emerg] "server" directive is not allowed here in
    Linux修改挂载目录名称
  • 原文地址:https://www.cnblogs.com/blogpro/p/11453389.html
Copyright © 2011-2022 走看看