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: 1846
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:Injection of extened classes
Next Topic:Why will EModelService not find the part Toolbar?
Goto Forum:

Current Time: Tue Oct 06 10:25:50 GMT 2015

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

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