Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » How to resize ViewPart at runtime?
How to resize ViewPart at runtime? [message #1111435] Wed, 18 September 2013 08:02 Go to next message
Tilak Sharma is currently offline Tilak SharmaFriend
Messages: 48
Registered: July 2009
Member
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 14:56 Go to previous message
John Doe is currently offline John DoeFriend
Messages: 25
Registered: May 2014
Junior Member
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.
Previous Topic:error on running eclipse update
Next Topic:Windows Builder erro in mac
Goto Forum:
  


Current Time: Thu Apr 25 01:00:53 GMT 2024

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

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

Back to the top