How to Programatically resize Detached Viewpart Window in Eclipse RCP? -
i have viewpart in eclipse rcp detaching using inbuild method. have button on detached viewpart , upon clicking window size of windows (in detached viewpart there) should increase can't find api same. can please ?
there 1 question found still don't know how resize eclipse rcp part
you need set size of shell
containing part.
for example, command handler increases size of shell containing active part 100 pixels in each direction:
public class resizehandler extends abstracthandler { @override public object execute(final executionevent event) throws executionexception { // active part iworkbenchpart part = handlerutil.getactivepart(event); // shell part site shell shell = part.getsite().getshell(); point size = shell.getsize(); // set new size shell.setsize(size.x + 100, size.y + 100); return null; } }
note: question linked talking new 'e4' api. since asking viewpart
using 3.x compatibility api.
Comments
Post a Comment