Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Update / refresh Part
Update / refresh Part [message #1000295] Mon, 14 January 2013 13:06 Go to next message
Aljoscha Steffens is currently offline Aljoscha SteffensFriend
Messages: 302
Registered: November 2012
Senior Member
Hello there,

I actually can't believe, but I just can't find a soultion to this simple problem.

Say I have a couple of partstacks visible in my application. I then add a new part to one of the stacks. The part is displayed correctly, but when I resize the part, the items in it jump into a slightly differen position (just different distances between the items, the layout remains the same).

Same if I create a NatTable item, I need to resize the part befor I can make use of the scrollbars in the part (they are there, but only after resize, they actually move the table).

So I guess I need to somehow update the part.

This is what I've tried so far:

///// creation of the part

		MPartStack stack = (MPartStack) modelService.find("TEST.partstack.editors", app);
		MInputPart part = MBasicFactory.INSTANCE.createInputPart();

		partService.showPart(part, PartState.ACTIVATE);


// in the DataSetEditor

	private void createContents(Composite parent){
		this.parent = parent;
		dataTable = new NatTable(parent, false);
	public void refresh(){

So... what do I need to do?
Re: Update / refresh Part [message #1000658 is a reply to message #1000295] Tue, 15 January 2013 07:34 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2595
Registered: July 2012
Senior Member

you should definitely have a look on how to use layout managers in SWT.

The question about NatTable I answered in the NatTable forum. Your issue there is related on how you create your NatTable. And NatTable has a refresh() method. There should be no need to tell the parent to redraw.

Previous Topic:eclipse 4 Application branding problem
Next Topic:Scrolling a JFace Viewer
Goto Forum:

Current Time: Sat May 26 02:42:32 GMT 2018

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

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

Back to the top