Is there any way to control the dimensions of a MessageBox?
I am using the very convinient MessageBox.showYesNoMessage and since now it had an easy nice and beatifull presentation of my questions to user.
Now, i came up with a question string that cannot handle it. As i discovered the user cannot change the MessageBox size with mouse, neither exists any internal property to control the dimensions let's say setWidth(), or whatever.
I suppose that if i will extend it i could create my own MessageBox with the desired functionality, but i have no idea where to start.
I would really appreciate any clue.
I am attaching a screenshot where a multi line text appears in Greek version of the message. The strange thing is that the english version is longer but still presented perfectly. It seems that SDK says "It's all greek to me"
In your SWT Environement "<your app>.ui.swt.SwtEnvironment" there is a method:
public void showMessageBoxFromScout(IMessageBox messageBox) {
}
IMessageBox is UI independent and contains the informations (title, text, severity...)
If you look at the implementation of showMessageBoxFromScout in org.eclipse.scout.rt.ui.swt.AbstractSwtEnvironment you see that this function instantiate a SwtScoutMessageBoxDialog.
In my case I created my own SwtCustomScoutMessageBoxDialog (extending SwtScoutMessageBoxDialog to change some behavior)
You are right, the default SwtScoutMessageBoxDialog does not look that nice for longer texts. You can improve it the way Jérémie described. If you think that your improved version of the message box could be useful for anyone, please feel free to contribute it to Scout (file a bug report and attach your patch).