// VAR Changed by Xie Yu Fan.Fandy 谢宇帆
static void XIE_FindMenu(Args _args)
{
    Dialog      dlg     = new Dialog("搜索菜单名称");
    DialogField dlgName = dlg.addField(typeId(name));
    name        menuName;

    void findMenu(SysDictMenu _sysDictMenu, name _MenuName, str _path = "" )
    {
        SysMenuEnumerator   me;
        ;
        if (_sysDictMenu.isMenuReference() || _sysDictMenu.isMenu())
        {
            _path   = (_path ? _path + "\t" : _path) + _sysDictMenu.label();
            me      = _sysDictMenu.getEnumerator();
            while (me.moveNext())
            {
                findMenu(me.current(), _MenuName, _path);
            }
        }
        else
        {
            if( _sysDictMenu.label() like "*"+_MenuName+"*")
            {
                info(_path + "\t" + _sysDictMenu.label());
            }
        }
    }
;
    dlg.doInit();
    dlgName.value("保存月底库存");

    if( !dlg.run())
        return;
    menuName = dlgName.value();
    if(menuName)
    {
        findMenu(SysDictMenu::newMainMenu(), menuName);
    }
}

 How to using code find the menu label of Menus【X++】

相关文章:

  • 2021-04-15
  • 2021-05-25
  • 2021-09-17
  • 2021-10-23
  • 2021-06-17
  • 2022-02-27
  • 2022-03-06
  • 2021-09-27
猜你喜欢
  • 2021-09-15
  • 2021-05-27
  • 2021-06-12
  • 2021-06-19
  • 2022-03-02
  • 2021-11-12
  • 2022-02-16
相关资源
相似解决方案