Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MessageBox.Show-- font change?

I'm using the MessageBox class to show errors to users, and while that might not be the right behavior, it's very convenient. This is a touchscreen application, however, so I need the 'ok' button to be much larger than it is (curse my inordinately large fingers!).

I think that if I increase the font size in the dialog box, I should be ok. Is there a way to do that? Or really, is there any way to increase the dialog size?

Thanks

like image 447
mmr Avatar asked Oct 24 '08 00:10

mmr


People also ask

How do I change font size in Messagebox?

WindowStyle = 'modal'; fontSize = 16; % Embed the required tex code in before the string. You can have the fontSize on line 22 be an input argument if you want.

What is the 2nd parameter in Messagebox show ()?

The first parameter msg is the string displayed in the dialog box as the message. The second and third parameters are optional and respectively designate the type of buttons and the title displayed in the dialog box. MsgBox Function returns a value indicating which button the user has chosen.


2 Answers

As far as I'm aware you can't, as the 'normal' dialog boxes are using your default system font settings.

Roll your own is probably the best way forward. It's fairly trivial to do, and much fun! And you can build in things that the standard dialog doesn't support (without PInvoke magic) such as centering in the middle of the screen etc.

like image 127
Wim Avatar answered Oct 02 '22 17:10

Wim


please check out my free to use FlexibleMessageBox which can be used instead of MessageBox and has a (static) FONT-Property.

Regards, Jörg

like image 42
jreichert Avatar answered Oct 02 '22 16:10

jreichert