RzGroupBar

匿名 (未验证) 提交于 2019-12-02 23:57:01

何分多层

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!