Use showInformation() with big message
2 posts
• Page 1 of 1
Use showInformation() with big message
Hello!
Need to show a big message to the user.
I´m using the function showInformation()
showInformation(this,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccccccccccccccccccccccccc.");
but it doesn´t show very well...as i can only see one line...with a scrollbar.
Any way to use the showInformation() to show the entire message or other function that i can use ?
Thank You
Need to show a big message to the user.
I´m using the function showInformation()
showInformation(this,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccccccccccccccccccccccccc.");
but it doesn´t show very well...as i can only see one line...with a scrollbar.
Any way to use the showInformation() to show the entire message or other function that i can use ?
Thank You
- Attachments
-
- Capture.JPG (15.89 KiB) Viewed 11830 times
- reversedr
- Posts: 35
- Joined: Tue Oct 23, 2018 11:03 am
Re: Use showInformation() with big message
One problem in vaadin is that windows don't calculate the frame size based on their content. So we set a fixed size. This is not good in case of a long message.
It's easy to change the size. If you use a standard JVx application, simply override the method:
of your Application class.
If you work with ProjX as application class, it's also possible to override the same method, but you also have an event for the case that you don't have a custom Application:
If you want to create a custom info dialog, create your own content:
Details, read this article.
It's easy to change the size. If you use a standard JVx application, simply override the method:
public <OP> IContent showInformation(OP pOpener, String pMessage) throws Throwable
of your Application class.
If you work with ProjX as application class, it's also possible to override the same method, but you also have an event for the case that you don't have a custom Application:
projx.eventOpenContainer().addListener(this, "doConfigureContainer");
public void doConfigureContainer(ProjX pProjX, IContainer pContainer, IContent pContent)
{
if (pContent instanceof Message)
{
if (isSizeUndefined(pContainer))
{
pContainer.setSize(new UIDimension(550, 300));
}
}
}
public void doConfigureContainer(ProjX pProjX, IContainer pContainer, IContent pContent)
{
if (pContent instanceof Message)
{
if (isSizeUndefined(pContainer))
{
pContainer.setSize(new UIDimension(550, 300));
}
}
}
If you want to create a custom info dialog, create your own content:
MyInfoContent info = new MyInfoContent();
//"this" is the opener
//null sets the application as opener
application.openContent(this, "Title", true, info);
public class MyContent extends Content
{
...
}
//"this" is the opener
//null sets the application as opener
application.openContent(this, "Title", true, info);
public class MyContent extends Content
{
...
}
Details, read this article.
-
Support@SIB - Posts: 353
- Joined: Mon Sep 28, 2009 1:56 pm
2 posts
• Page 1 of 1