MessageBox.Show right to left reading not working
Write a method that will default all the values you don't want to set.
//Message is the string message and options is where you specify RTL
public void ShowMessageBox(string message, MessageBoxOptions options)
{
MessageBox.Show(message, "", MessageBoxButtons.OK, MessageBoxIcons.None, MessageBoxDefaultButton.Button1, options);
}
Then all you have to do is call
ShowMessageBox("abc", MessageBoxOptions.RtlReading)
If it's not displaying left to right, try this:
//note the capitalized B in Box
MessageBox.Show(new string("abc".Reverse()), "", MessageBoxButtons.OK, MessageBoxIcons.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign);
If you want something like this:
----------------------------X-- ------------------------------- | | | | | cba | | | | |OK| | -------------------------------
I think it doesn't have to do with that though, it's mainly you got the parameters wrong. wrong. Here, fixed:
//note the capitalized B in Box
MessageBox.Show("abc", "", MessageBoxButtons.OK, MessageBoxIcons.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading);
There's also an ugly way to do this, but it means you don't have to add the extraparams. First, make a class called MessageBoxEx, and the contents of it are...
static class MessageBoxEx
{
public static void Show(string content, MessageBoxOptions options)
{
MessageBox.Show(content, "", MessageBoxButtons.OK, MessageBoxIcons.None, MessageBoxDefaultButton.Button1, options);
}
}
and call it like MessageBoxEx.Show("abc", MessageBoxOptions.RtlReading);
.