Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Property sheet with table
Property sheet with table [message #831997] Thu, 29 March 2012 16:11
Joao S is currently offline Joao S
Messages: 51
Registered: January 2011
Member
Hi all,

I´m trying to develop a property sheet with a table.

I´ve studied the example code in graphiti help contents and my createControls method looks like this:

@Override
	public void createControls(Composite parent,
			TabbedPropertySheetPage tabbedPropertySheetPage) {
		super.createControls(parent, tabbedPropertySheetPage);

		TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
		Composite parentComposite = factory.createFlatFormComposite(parent);

		Table table = factory.createTable(parentComposite, SWT.BORDER
				| SWT.FULL_SELECTION);
		table.setHeaderVisible(true);
		table.setLinesVisible(true);

		TableColumn column1 = new TableColumn(table, SWT.LEFT);
		TableColumn column2 = new TableColumn(table, SWT.LEFT);

		column1.setText("Column1");
		column2.setText("Column2");

		TableColumnLayout layout = new TableColumnLayout();
		parentComposite.setLayout(layout);

		layout.setColumnData(column1, new ColumnWeightData(30));
		layout.setColumnData(column2, new ColumnWeightData(60));
	}


When at first I select a pictogram in my diagram my properties sheet looks fine and then, I select another pictogram and inexplicably my table grows in width.

Any ideas on this?
Thanks
Joao

[Updated on: Thu, 29 March 2012 16:12]

Report message to a moderator

Previous Topic:creating a ChopboxAnchor on a nested polygon
Next Topic:Any hooks for connection source feedback?
Goto Forum:
  


Current Time: Mon Sep 22 18:30:58 GMT 2014

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

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