How to resize ViewPart at runtime? [message #1111435] |
Wed, 18 September 2013 04:02  |
Eclipse User |
|
|
|
Hi,
In the WindowBuilder editor, the ViewPart that is used for designing the UI is too small for our use-case.
We have created custom components of size 900*900 as well. But when we drag and drop any components (which are of larger size than the Viewpart) onto the ViewPart, and run the UI, we see that our components are being clipped off.
The only solution is to manually resize the Viewpart everytime we drag and drop.
Is there a programmatic way to resize the ViewPart based on the dropped object's size?
That is, either the ViewPart should automatically resize itself or I need a callback upon drag and drop so that I can calculate the required dimensions and set the Viewpart's size.
Please suggest.
Thanks,
Tilak
|
|
|
Re: How to resize ViewPart at runtime? [message #1376732 is a reply to message #1111435] |
Fri, 23 May 2014 10:56  |
Eclipse User |
|
|
|
Hello,
I have the same problem than you, I would like to resize a part in the code. I tried to set the containerData of the Part :
@Inject
EModelService modelService;
@Inject
MApplication application;
@PostConstruct
void init(BorderPane pane) {
MPart myPart = (MPart) modelService.find("mypartid", application);
myPart .setContainerData("80"); //80 or 5000 or 1, nothing works
}
It doesn't work I don't know why.
|
|
|
Powered by
FUDForum. Page generated in 0.03729 seconds