Dynamics ax add a button

添加一个按钮,重写方法

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/

    Danzel
    Danzel管理员

    • 声明:本文由Danzel于2021-05-24转载(优化),转载须经原站同意并注明出处。
    • 本文地址:http://maryd.cn/?id=172
    上一篇:Dynamics ax 2012 Hide disable button
    下一篇:Dynamics ax 2012 Override the Cancel and OK button methods

    留言评论

    暂无留言
    取消
    扫码支持