Discussion:
Class Box and text on OK/Cancel/Yes/No buttons
(too old to reply)
Mags
2009-02-24 11:34:01 UTC
Permalink
If I use Box::YesNo( ...) or Box::OkCancel the text on the buttons always
shows yes/no and is not according to chosen language.
Is this a 'bug' or has anyone got a solution to the problem? Can it be the
language of the operating system?
--
Mags
SysProg
2009-02-24 22:42:01 UTC
Permalink
Hi Mags,

Go into Classes/Global/Box/YesNo method.

You should see somthing similar to this:

public client static DialogButton yesNo(
str _text,
DialogButton _defaultButton,
str _title = "@SYS11132",
str _bottomText = '')
{
if (clientKind() == ClientType::COMObject)
return _defaultButton;

return new DialogBox(DialogBoxType::YesNoBox,
_text,
_title,
_bottomText,
_defaultButton).retval();
}


Make sure @SYS.... is translated in whatever .ald file you are trying to
translate them in.

If not add the translation, delete the .ali file restart the aos box.

Regards.
Post by Mags
If I use Box::YesNo( ...) or Box::OkCancel the text on the buttons always
shows yes/no and is not according to chosen language.
Is this a 'bug' or has anyone got a solution to the problem? Can it be the
language of the operating system?
--
Mags
SysProg
2009-02-24 22:55:01 UTC
Permalink
Mags,

Correction the class of interest is DialogBox, I believe.

Regards.
Post by SysProg
Hi Mags,
Go into Classes/Global/Box/YesNo method.
public client static DialogButton yesNo(
str _text,
DialogButton _defaultButton,
str _bottomText = '')
{
if (clientKind() == ClientType::COMObject)
return _defaultButton;
return new DialogBox(DialogBoxType::YesNoBox,
_text,
_title,
_bottomText,
_defaultButton).retval();
}
translate them in.
If not add the translation, delete the .ali file restart the aos box.
Regards.
Post by Mags
If I use Box::YesNo( ...) or Box::OkCancel the text on the buttons always
shows yes/no and is not according to chosen language.
Is this a 'bug' or has anyone got a solution to the problem? Can it be the
language of the operating system?
--
Mags
Mags
2009-02-25 07:47:01 UTC
Permalink
Hi Sysprog,

The problem is that DialogBox is not available under classes. It is just
documentet under 'System documentation'.
--
Mags
Post by SysProg
Mags,
Correction the class of interest is DialogBox, I believe.
Regards.
Post by SysProg
Hi Mags,
Go into Classes/Global/Box/YesNo method.
public client static DialogButton yesNo(
str _text,
DialogButton _defaultButton,
str _bottomText = '')
{
if (clientKind() == ClientType::COMObject)
return _defaultButton;
return new DialogBox(DialogBoxType::YesNoBox,
_text,
_title,
_bottomText,
_defaultButton).retval();
}
translate them in.
If not add the translation, delete the .ali file restart the aos box.
Regards.
Post by Mags
If I use Box::YesNo( ...) or Box::OkCancel the text on the buttons always
shows yes/no and is not according to chosen language.
Is this a 'bug' or has anyone got a solution to the problem? Can it be the
language of the operating system?
--
Mags
unknown
2009-02-25 12:05:01 UTC
Permalink
It's under Classes\Box

methods you are interested in are okCancel and yesNo..

Take a look at the following link as well:
http://kashperuk.blogspot.com/2007/04/dynamics-ax-tutorials-tutorial-2.html
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Mags
Hi Sysprog,
The problem is that DialogBox is not available under classes. It is just
documentet under 'System documentation'.
--
Mags
Post by SysProg
Mags,
Correction the class of interest is DialogBox, I believe.
Regards.
Post by SysProg
Hi Mags,
Go into Classes/Global/Box/YesNo method.
public client static DialogButton yesNo(
str _text,
DialogButton _defaultButton,
str _bottomText = '')
{
if (clientKind() == ClientType::COMObject)
return _defaultButton;
return new DialogBox(DialogBoxType::YesNoBox,
_text,
_title,
_bottomText,
_defaultButton).retval();
}
translate them in.
If not add the translation, delete the .ali file restart the aos box.
Regards.
Post by Mags
If I use Box::YesNo( ...) or Box::OkCancel the text on the buttons always
shows yes/no and is not according to chosen language.
Is this a 'bug' or has anyone got a solution to the problem? Can it be the
language of the operating system?
--
Mags
CHERNOV ZAHAR
2010-11-22 12:22:45 UTC
Permalink
Check this post how to call different prompt dialog boxes:

http://xplusplus.info/index.php/how-to-prompt-a-dialog-box-or-a-modal-window/
Post by Mags
If I use Box::YesNo( ...) or Box::OkCancel the text on the buttons always
shows yes/no and is not according to chosen language.
Is this a 'bug' or has anyone got a solution to the problem? Can it be the
language of the operating system?
--
Mags
Post by SysProg
Hi Mags,
Go into Classes/Global/Box/YesNo method.
public client static DialogButton yesNo(
str _text,
DialogButton _defaultButton,
str _bottomText = '')
{
if (clientKind() == ClientType::COMObject)
return _defaultButton;
return new DialogBox(DialogBoxType::YesNoBox,
_text,
_title,
_bottomText,
_defaultButton).retval();
}
translate them in.
If not add the translation, delete the .ali file restart the aos box.
Regards.
Post by SysProg
Mags,
Correction the class of interest is DialogBox, I believe.
Regards.
Post by Mags
Hi Sysprog,
The problem is that DialogBox is not available under classes. It is just
documentet under 'System documentation'.
--
Mags
Post by unknown
It's under Classes\Box
methods you are interested in are okCancel and yesNo..
http://kashperuk.blogspot.com/2007/04/dynamics-ax-tutorials-tutorial-2.html
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Submitted via EggHeadCafe
Sterling Database for Silverlight and Windows Phone 7
http://www.eggheadcafe.com/tutorials/aspnet/f4731b1a-dadb-4b4f-b9a8-a5d9ef7a76dd/sterling-database-for-silverlight-and-windows-phone-7.aspx
Loading...