向对话框添加按钮 [英] Adding a button to a dialog

查看:144
本文介绍了向对话框添加按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否将AX对话框按钮限制为确定取消

是否可以在对话框中添加自定义按钮?

Are AX dialog buttons limited to OK and Cancel?
Is it possible to add a custom button to the dialog?

我的对话框具有以下代码:

I have the following code for my dialog:

static void mitTabPage(Args _args)
{
    Dialog          dialog;
    DialogGroup     dialoggroup, dialoggroup2;
    DialogField     dialogfield, dialogfield2;
    ;
    dialog      = new Dialog ("A new Dialog");

    dialog.addTabPage("Brand Id's");
    dialoggroup = dialog.addGroup("Brand Id's");
    dialogfield = dialog.addField(extendedTypeStr(SYCCarBrandId));

    dialog.addTabPage("Owners");
    dialoggroup2    = dialog.addGroup("Owners");
    dialogfield2    = dialog.addField(extendedTypeStr(SYCOwner));

    dialog.run();
}

我想在对话框中添加另一个按钮。我该怎么办?

I'd like to add another button to the dialog. How can I do that?

推荐答案

对话框框架是一个简单的框架,用于提示用户获取一些数据/设置然后执行一些操作。操作或取消。

The Dialog framework is a simple framework for prompting users to obtain some data/settings then performing some action or canceling.

对于您要执行的操作,使用对话框框架很可能没有任何意义,而是可以/应该创建另一种形式

For what you're trying to do, it most likely doesn't make sense to use the dialog framework and instead you could/should create another form if you need additional functionality.

但是,如果您确实坚持使用Dialog框架,则可以添加运行时按钮并使用registerOverrideMethod。

However, if you do insist on using the Dialog framework for this, you would add a runtime button and use registerOverrideMethod.

请参阅以下链接:

https://msdn.microsoft.com/zh-CN/library/dialogfield.registeroverridemethod.aspx

https://blogs.msdn.microsoft.com/axsupport/2015/06/07/u在运行时单独添加一个控件/

这篇关于向对话框添加按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆