添加一个按钮,重写方法
Dialog dlg = new Dialog(); DialogGroup dlgGroup; FormBuildGroupControl buttonGroup; FormBuildButtonControl buttonControl; dlgGroup = dlg.addGroup('ButtonGroup'); buttonGroup = dlg.formBuildDesign().control(dlgGroup.formBuildGroup().id()); buttonControl = buttonGroup.addControl(FormControlType::Button, 'A Button'); buttonControl.registerOverrideMethod(methodStr(FormButtonControl, clicked), methodStr(YourClass, yourClickedMethod), this);
//add a button //oKbutton = dialog.formBuildDesign().addControl(FormControlType::Button, "DynamicButtonControl"); //oKbutton.text("OK");
https://cloudblogs.microsoft.com/dynamics365/no-audience/2015/06/07/using-x-to-add-a-control-at-runtime/
留言评论
暂无留言