diff --git a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md index 80f6f295..249ee33e 100644 --- a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md +++ b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md @@ -447,5 +447,18 @@ begin if (fedtusr_FBaseUnitId.itemindex <> -1) and (fedtusr_FMinIssueUnitId.Text = '') then fedtusr_FMinIssueUnitId.itemindex := fedtusr_FBaseUnitId.itemindex; end. +``` +## 获取枚举值写入到文本中 + +获取枚举控件A的值,写入到文本控件B中(不适用于装配属性) + +```Delphi +uses MyClass,Variables,BaseUtil,CommonFunc,DataConst,CFFrm,CFSimplePropFrm,Forms,StdCtrls,Variants,SysUtils,Classes,Controls,Dialogs, + CHostIntf,ProductClas,DocClas,LoginClas,VirtualTrees,CEntClas,PathClas; + +begin + if A.itemindex <> -1 then + B.Text := A.Text; +end. ``` \ No newline at end of file