Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » MessageBox dimensions
MessageBox dimensions [message #1003287] Sun, 20 January 2013 16:57 Go to next message
Eclipse UserFriend
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.

index.php/fa/13023/0/

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 01:00 Go to previous messageGo to next message
Eclipse UserFriend
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 02:14 Go to previous message
Eclipse UserFriend
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

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


Current Time: Wed Jul 23 22:48:01 EDT 2025

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

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

Back to the top