vault backup: 2025-08-31 20:44:48
This commit is contained in:
@ -833,4 +833,52 @@ end.
|
||||
|
||||
## 控制组合框是否显示
|
||||
|
||||
通过单选枚举字段去控制组合框是否要
|
||||
通过单选枚举字段去控制组合框是否要显示出来
|
||||
|
||||
首先建一个枚举类型字段,作为单选框的切换字段,可以是系统字段/表单字段,然后在设计页面,使用刚刚的字段添加“单选组合框”,记住控件名称
|
||||
|
||||

|
||||
|
||||
选中任意字段,添加“组合框”,用来批量控制 显示/隐藏,记住控件名
|
||||
|
||||

|
||||
|
||||
往组合框中添加子控件,不需要记控件名
|
||||
|
||||

|
||||
|
||||
打开 **单选组合框** 的“值改变时执行”
|
||||
|
||||

|
||||
|
||||
写入脚本如下:
|
||||
|
||||
```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.
|
||||
```
|
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204336.png
Normal file
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204336.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 218 KiB |
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204352.png
Normal file
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204352.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 205 KiB |
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204404.png
Normal file
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204404.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 216 KiB |
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204430.png
Normal file
BIN
SanPinPLM/相关操作/4.0-other/assets/Pasted image 20250831204430.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 192 KiB |
Reference in New Issue
Block a user