vault backup: 2025-08-31 20:44:48

This commit is contained in:
2025-08-31 20:44:48 +08:00
parent 2ff6f4d7b8
commit e68b86fbd0
5 changed files with 49 additions and 1 deletions

View File

@ -833,4 +833,52 @@ end.
## 控制组合框是否显示
通过单选枚举字段去控制组合框是否要
通过单选枚举字段去控制组合框是否要显示出来
首先建一个枚举类型字段,作为单选框的切换字段,可以是系统字段/表单字段,然后在设计页面,使用刚刚的字段添加“单选组合框”,记住控件名称
![](assets/Pasted%20image%2020250831204336.png)
选中任意字段,添加“组合框”,用来批量控制 显示/隐藏,记住控件名
![](assets/Pasted%20image%2020250831204352.png)
往组合框中添加子控件,不需要记控件名
![](assets/Pasted%20image%2020250831204404.png)
打开 **单选组合框** 的“值改变时执行”
![](assets/Pasted%20image%2020250831204430.png)
写入脚本如下:
```delphi
uses MyClass,Variables,BaseUtil,CommonFunc,DataConst,CFFrm,CFSimplePropFrm,Forms,StdCtrls,Variants,SysUtils,Classes,Controls,Dialogs,
     CHostIntf,ProductClas,DocClas,LoginClas,VirtualTrees,CEntClas,PathClas,cxRadioGroup;
var
  trg: TcxRadioGroup;
begin
  trg := TcxRadioGroup(Sender);
  if trg.itemindex = 0 then
  begin
     gbcxtsCusPage_1.visible := false;
  end
  else begin
     gbcxtsCusPage_1.visible := true;
  end;
end.
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB