Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » MessageBox dimensions
MessageBox dimensions [message #1003287] Sun, 20 January 2013 21:57 Go to next message
Stathis Alexopoulos is currently offline Stathis AlexopoulosFriend
Messages: 42
Registered: September 2010
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"
Re: MessageBox dimensions [message #1003851 is a reply to message #1003287] Tue, 22 January 2013 06:00 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1250
Registered: October 2011
Senior Member
Here something I have done to test mac specific

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)

I hope it helps you to start
Re: MessageBox dimensions [message #1004936 is a reply to message #1003851] Thu, 24 January 2013 07:14 Go to previous message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 92
Registered: November 2010
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). Wink

Previous Topic:Adding scrollbars to forms...
Next Topic:Differences between date fields
Goto Forum:

Current Time: Thu May 24 00:49:13 GMT 2018

Powered by FUDForum. Page generated in 0.01717 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top