Is the new MessageDialog class a really bad UI ?

Dialogs are a very important part in windows apps, there is a mechanism to create custom dialogs, save them as part of the resources in the EXE and then reuse them in the app. This makes the native dialogs consistent across the platform.

Xojo never used this part of the win32 api, and you can notice the lack of consistency and how bat this looks in the IDE itself:

And now, they added a new class to make easier to user do this very same non native bad looking custom dialogs. This is not only a terrible UI, this messes the whole UX of the app. Making this native, and implemented in the IDE wil also improve its UX

What the rest of the comunity think about, it is important to have a consistent UI in your app? Or you can put in there whatever is easier even if it looks really bad?

<https://xojo.com/issue/58113>

Maybe xojo dont really uses windows, and the aswer in the FC is like the old “flicker is how windows works”. This reminded a UX conference

link text

Xojo really, really, need to treat Windows OS with all necessary love the most used Desktop OS in the world deserves. I hope that they have someone using only Windows tools 24/7 in their team, that helps a bit.

As far as I know then this has always been problem with Windows and not just Xojo. That the native Dialogs just use the translation that is in your Windows UI settings for the Buttons. Which is why in most of the programming frameworks they end up making custom dialogs.

“custom dialogs” that are Native ones. Or a custom windows at least using the same guidelines.

What he means is the native dialog (MsgBox) localizes its button captions differently than Xojo handles localization. To be consistent, Xojo had to introduce a non-native dialog (MessageDialog) so that your buttons wouldn’t be localized differently from the rest of your app.

Such mimic needs a bit more enhancement. And the Icon should be read from the system instead of internal Xojo lib. Win32 has all necessary calls to do the job in a better way. FWIW, if someone needs the localized text button, for example, I think that the call (from User32.dll) is MB_GetString(theDialogBoxCommandID) and

Public Enum DialogBoxCommandID IDOK = 0 IDCANCEL = 1 IDABORT = 2 IDRETRY = 3 IDIGNORE = 4 IDYES = 5 IDNO = 6 IDCLOSE = 7 IDHELP = 8 IDTRYAGAIN = 9 IDCONTINUE = 10 End Enum

So in an spanish system the IDYES should get a “Si” instead of a “Yes”.

[quote=463475:@Rick Araujo]Such mimic needs a bit more enhancement. And the Icon should be read from the system instead of internal Xojo lib. Win32 has all necessary calls to do the job in a better way. FWIW, if someone needs the localized text button, for example, I think that the call (from User32.dll) is MB_GetString(theDialogBoxCommandID) and

Public Enum DialogBoxCommandID IDOK = 0 IDCANCEL = 1 IDABORT = 2 IDRETRY = 3 IDIGNORE = 4 IDYES = 5 IDNO = 6 IDCLOSE = 7 IDHELP = 8 IDTRYAGAIN = 9 IDCONTINUE = 10 End Enum

So in an spanish system the IDYES should get a “Si” instead of a “Yes”.[/quote]
You’re missing the point, and Ivan’s screenshots even show it. If you author an app in English and it has no Spanish strings in it at all, the buttons in MsgBox may be Spanish, when the rest of the app is in English. That kind of inconsistency is what MessageDialog is designed to avoid.

That is wrong.

It looks like you dont event know what a Dialog is in windows or how they work. The spanish parts in my screenshots are because xojo calls the Comdlg32 lib, that has localized dialogs.

BUT a custom NATIVE dialog can have any text or localization. They can have any functionality but whit a consistent UX acros apps in the OS.

As Ivan said, to “mimic” it in a better way, the background features and colors must be mimicked, the icon set should be native, the buttons’ alignment should be set to the right of grey part of the bottom window (at least for most left-to-right written languages). The default button text labels should be set to the native ones. Maybe Xojo did not used a full native call because the Xojo Embedwithin feature of such class, but a better emulation should be done.

There is another aspect of Xojo’s current MessageDialog implementation.
In many situations, one should/could use a TaskDialog.

On TargetWindows, there is a native way for that. But since Xojo is x-platform, it could still use that - and just fall back to MessageDialog for the other BuildTargets. <https://xojo.com/issue/58325>

Here is an example project.

On macOS, you could use NSAlert. It differs from TaskDialog, but some features are quite similar (and you got localized buttons unlike MsgBox on macOS). But because of the differences, it would be difficult to put them into an xplatform wrapper which is what Xojo did quite elegantly with both built-in dialogs, even though not fully native and lacking some of the common features (of which I don’t know how they apply to Linux).

It is just a regular modal window, they dont even bother to use the system icons, button alignment, margins, layout, Incorrect size if not using both Explanation and Message…

Is that an elegant solution?

[quote=463891:@Ivan Tellez]It is just a regular modal window, they dont even bother to use the system icons, button alignment, margins, layout, Incorrect size if not using both Explanation and Message…

Is that an elegant solution?[/quote]
It would be helpful if you’d create feature requests and/or bug reports about this and put them in Feedback.

I think that’s this one: <https://xojo.com/issue/58113>
And for the TaskDialog: <https://xojo.com/issue/58325>

[quote=463903:@Jürg Otter]I think that’s this one: <https://xojo.com/issue/58113>
And for the TaskDialog: <https://xojo.com/issue/58325>[/quote]
Thanks Jürg!