如何在现有屏幕中移动自定义操作/按钮位置 [英] How to Move Customized Action/Button place in existing screen

查看:17
本文介绍了如何在现有屏幕中移动自定义操作/按钮位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要在现有屏幕上添加一个新的返回按钮",即归还二手车.我已经添加了返回按钮"按钮,但它终于来了,我们想在保存操作之前移动这个按钮.

We have a requirement to add a new "Back Button" to the existing screen i.e. Preowned Vehicles Returns. I have added the "Back Button" button but it is coming at last, we would like to move this button before the Save action.

您能在这里提供您的想法吗?

Could you please provide your thoughts here?

推荐答案

是否可以使用图形扩展来移动按钮?您可以在图形扩展中覆盖 Initialize() 并使用 Actions.Move() 在另一个操作按钮之后移动一个操作按钮.我不确定是否有一种方法可以将按钮置于另一个之前,但您可以将它们移动两次.例如:如果你想在[1, 2, 3]中将3移动到1之前,可以在1之后直接放3,然后在3之后直接放1.

Is it possible to use a graph extension to move the button? You can override Initialize() in your graph extension and use Actions.Move() to move an action button after another action button. I'm not sure if there's a method that places a button before another but you can move them twice. For example: If you want to move 3 before 1 in [1, 2, 3], you can place 3 immediately after 1, then place 1 immediately after 3.

public class GraphExtension : PXGraphExtension<BaseGraph>
{
    public override void Initialize()
    {
        base.Initialize();
        Base.Actions.Move(nameof(Base.Save), nameof(Base.BackButton), true);
        Base.Actions.Move(nameof(Base.BackButton), nameof(Base.Save), true);
    }
}

变成

这篇关于如何在现有屏幕中移动自定义操作/按钮位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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