XylemFlow 8 Posted June 26, 2023 I use TDialogServiceSync.MessageDialog and TDialogServiceSync.ShowMessage in my Windows / mac OS application. However, I've added a dark mode to my application from a downloaded style and it doesn't seem possible to set the style of these message boxes. The only solution seems to be to create my own message dialog forms and call them using ShowModal. Firstly, will that give exactly the same behaviour? Secondly, does anyone have or know of any free code for message dialog forms? I'd like it to support the various button combination options (TMsgDlgButtons) and an icon depending on TMsgDlgType. If not I'll of course make them myself. Share this post Link to post
XylemFlow 8 Posted June 26, 2023 I guess that one issue will be that currently I think the message boxes show the text on the buttons in the user's own language according to their Windows regional settings. Share this post Link to post
Roger Cigol 128 Posted June 27, 2023 If you are displaying message boxes in your code, you are presumably displaying text inside them. So if you are worried about the language of the buttons you presumably have a strategy for handling different languages for the text that you are displaying in the box. Surely you can use the same strategy to translate the button captions? I frequently use my own dialog boxes and ShowModal() rather than the OS message boxes. One advantage I find is that when users ask for support over the phone it is much easier to determine if the message box is generated by my code (because I give it a red or blue background (for error or warning)) or if the message box is generated by the OS (in which case it is in the standard OS colours). I haven't found any problems with this approach. Share this post Link to post
GabrielMoraru 34 Posted Tuesday at 06:39 PM On 6/27/2023 at 10:36 PM, Roger Cigol said: I frequently use my own dialog boxes and ShowModal() How do you deal with Android? It does not support blocking messages... Share this post Link to post
Remy Lebeau 1571 Posted Tuesday at 07:04 PM 22 minutes ago, GabrielMoraru said: How do you deal with Android? It does not support blocking messages... When displaying a popup message, you have to use the non-modal version, and break up your code logic so it can be continued by the popup's asynchronous callback when the popup is closed. 1 Share this post Link to post
GabrielMoraru 34 Posted Thursday at 10:04 AM On 4/15/2025 at 9:04 PM, Remy Lebeau said: When displaying a popup message, you have to use the non-modal version, and break up your code logic so it can be continued by the popup's asynchronous callback when the popup is closed. That's why I am asking how Roger deals with it. In my view, if you want true support for cross-platform (this includes also Android), there is no such thing as blocking/synchronous/modal dialog messages in FMX. Share this post Link to post
Roger Cigol 128 Posted Thursday at 10:28 AM On 4/15/2025 at 7:39 PM, GabrielMoraru said: How do you deal with Android? It does not support blocking messages... @GabrielMoraru Sorry to disappoint: I do very little Android programming. I think for mobile devices error reporting by a separate message box would not fit a user interface very well. Every time I try and do anything useful (with other firm's/organisation's apps) on a handheld device I think "well the designer of the software didn't do a bad job but everything would be easier on my desk top". Then I get back to base and do the same actions on my desktop and guess what? everything is so much easier ! Share this post Link to post
Sherlock 683 Posted Thursday at 02:50 PM 4 hours ago, Roger Cigol said: ...everything is so much easier ! Except carrying the rig around. *SCNR* 2 Share this post Link to post
GabrielMoraru 34 Posted 13 hours ago (edited) Also the TDialogServiceAsync.MessageDialog looks disappointing. No icons, no titlebar, no flavor. 😞 And the Fmx.Dialogs.ShowMessage is marked as deprecated 😞 _ Looks like I need to bake my own messages. I have seen a library here doing that but it uses Application.ProcessMessages - something I am not yet mentally prepared to accept 🙂 Edited 12 hours ago by GabrielMoraru Share this post Link to post