次の方法で共有


Display customizable help or status text in the status line

In the right side of the status line there is a small area where you set custom texts independently of the help text (which is shown to the left).

Here is a small job demonstrating this:

 static void setStatusLineText(Args _args)
{
    ;

    xUserInfo::statusLine_CustomText(true); // Force the text to be shown
    infolog.writeCustomStatlineItem("AX Rules");
}

If you don’t force the text to be shown, it will only appear if the user setting “Show customizable Help text field” option is checked on the “Status bar” tab page of the user options form.

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm

Comments

  • Anonymous
    October 22, 2006
    Hi Palle, I have tried your statusline example in Ax 3. And it seems as if there is no static method with the name statusLine_CustomText. The compiler tells me: "statusLine_CustomText is not a class function." I have looked at the xUserInfo class and as far as I can see, the compiler is right :-). What is not right? Is it in Ax 4 or? Best regards Lars

  • Anonymous
    October 22, 2006
    In 3.0 you don't have the statusLine_CustomText on the xUserInfo class. This is the code we need to force the message to be shown, even if the user hasn't turned on the "Show customizable Help text field" option. So here is the code like it would look in 3.0: static void WriteCustomStatLineTxt(Args _args) {    //  Force the text to be shown -->    #SysBitPos    #define.BitPos(#BitPos_11)    UserInfo userInfo;    int      original;    ;    ttsbegin;    userInfo = xUserInfo::find(true);    original = userInfo.statuslineInfo;      userInfo.statuslineInfo  = userInfo.statuslineInfo | #BitPos;      if (original != userInfo.statuslineInfo)    {        userInfo.update();        if (curuserid() == userInfo.id)        {            infolog.getUserSetup().setUserSetup(userInfo);        }    }    ttscommit;    //  <-- Force the text to be shown    infolog.writeCustomStatlineItem("AX Rules"); }