Axapta 字符串填充和对齐

Axapta 字符串填充和对齐,axapta,microsoft-dynamics,dynamics-ax-2012,dynamics-ax-2012-r2,dynamics-ax-2012-r3,Axapta,Microsoft Dynamics,Dynamics Ax 2012,Dynamics Ax 2012 R2,Dynamics Ax 2012 R3,我今天试着用TextIo保存一个文件。只有3行: Radio Station;MagicFM Test;This is jost for testing purpose. TV;TV_Brand 一切都很好,但后来我读了 我不能把这些东西对齐 可能类似于: Radio Station - MagicFM Test - This is jost for testing purpose. TV - TV_Br

我今天试着用TextIo保存一个文件。只有3行:

Radio Station;MagicFM
Test;This is jost for testing purpose.
TV;TV_Brand
一切都很好,但后来我读了

我不能把这些东西对齐

可能类似于:

Radio Station         - MagicFM
Test                  - This is jost for testing purpose.
TV                    - TV_Brand
这就是我的代码:

info(strFmt("%1  - %2", strLFix( conPeek(con, 1), 20),conpeek(con, 2)));

我和strLFix和strLFix玩过一点,但是运气不好。。有没有一个简单的方法可以做到这一点?

你必须像
信使一样使用
。您无法在视觉上与可变宽度字体对齐。

像这样对齐输出不是
infolog
的预期用途,正如Matej所说,原因在于字体。但是,如果您希望将infolog用于显示目的,您可能希望这样使用它以获得以下输出:

static void Job114(Args _args)
{
    container       c, cc;
    int             i;

    c = [["Radio Station", "MagicFM"], ["Test", "This is jost for testing purpose."], ["TV", "TV_Brand"]];
    setPrefix("Output"); // SetPrefix is necessary to get the tabbing to function correctly
    for (i=1; i<=conLen(c); i++)
    {
        cc = conPeek(c, i);
        info(strFmt("%1\t%2", conPeek(cc, 1), conPeek(cc, 2)));
    }
}
static void Job114(Args\u Args)
{
容器c,cc;
int i;
c=[“电台”、“MagicFM”]、[“测试”、“这是测试用jost”]、[“电视”、“电视品牌”];
setPrefix(“Output”);//setPrefix是使选项卡正常工作所必需的

对于(i=1;i您可以尝试使用
System.String.Format
方法,如:

str       s; 
s = System.String::Format("{0, -15} - {1, -15}", "Radio Station", "MagicFM");    
info(s);

请参阅,并获取更多信息。

感谢您的详细回复,我看到您也提到了与Matej一样的字体,但是..我在哪里更改它?我不建议更改它,但它是表单
\Forms\SysInfologBrowser