Home » Eclipse Projects » JFace » Table using ColumnWeightData not resizing correctely
Table using ColumnWeightData not resizing correctely [message #1716091] |
Tue, 01 December 2015 09:23 |
Xavipen Mising name Messages: 59 Registered: March 2011 |
Member |
|
|
I have a Group with GridLayout that contains a Composite with a TableColumnLayout and two buttons.
The composite is set to FILL both vertical and horizontal. Additionally the Composite is set to grabExcessHorizontalSpace so it can adjust to different screen sizes.
If for the TableColumns, I only use ColumnPixelData, everything works fine. However, if i set one of the TableColumns to ColumnWeightData then the group is allways slightly bigger than the Parent Composite where i place it.
Moreover, I have used it in a Section within a form, the parent Composite has a Scrollbar panel. Every time the section is close an open the horizontal size of the parent composite grows bigger.
Could somebody tell me if i am missing something?
Here is the code
Group grpPermittedGlobalVcids = new Group(compositeMain, SWT.NONE);
grpPermittedGlobalVcids.setLayout(new GridLayout(2, false));
GridData gd_grpPermittedGlobalVcids = new GridData(SWT.FILL, SWT.TOP, false, false, 7, 1);
gd_grpPermittedGlobalVcids.minimumHeight = 145;
gd_grpPermittedGlobalVcids.heightHint = 155;
grpPermittedGlobalVcids.setLayoutData(gd_grpPermittedGlobalVcids);
grpPermittedGlobalVcids.setText("Permitted Global VCIDs");
Composite composite_1 = new Composite(grpPermittedGlobalVcids, SWT.NONE);
GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 3);
gd_composite_1.heightHint = 138;
composite_1.setLayoutData(gd_composite_1);
TableColumnLayout tcl_composite_1 = new TableColumnLayout();
composite_1.setLayout(tcl_composite_1);
tableViewer = new TableViewer(composite_1, SWT.BORDER | SWT.FULL_SELECTION);
table_1 = tableViewer.getTable();
table_1.setHeaderVisible(true);
table_1.setLinesVisible(true);
tableViewerColumnSpacecraftId = new TableViewerColumn(tableViewer, SWT.NONE);
TableColumn tblclmnSpacecraftId = tableViewerColumnSpacecraftId.getColumn();
tcl_composite_1.setColumnData(tblclmnSpacecraftId, new ColumnPixelData(150, true, true));
tblclmnSpacecraftId.setText("Spacecraft ID");
tableViewerColumnFrameVersion = new TableViewerColumn(tableViewer, SWT.NONE);
TableColumn tblclmnFrameVersion = tableViewerColumnFrameVersion.getColumn();
tcl_composite_1.setColumnData(tblclmnFrameVersion, new ColumnPixelData(150, true, true));
tblclmnFrameVersion.setText("Frame Version");
tableViewerColumnVcId = new TableViewerColumn(tableViewer, SWT.NONE);
TableColumn tblclmnVirtualChannel = tableViewerColumnVcId.getColumn();
tcl_composite_1.setColumnData(tblclmnVirtualChannel, new ColumnPixelData(150, true, true));
tblclmnVirtualChannel.setText("Virtual Channel");
btnAddGVCID = new Button(grpPermittedGlobalVcids, SWT.NONE);
btnAddGVCID.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
btnAddGVCID.setText("Add");
btnRemoveGVCID = new Button(grpPermittedGlobalVcids, SWT.NONE);
btnRemoveGVCID.setText("Remove");
new Label(grpPermittedGlobalVcids, SWT.NONE);
|
|
|
Goto Forum:
Current Time: Fri Sep 20 13:24:23 GMT 2024
Powered by FUDForum. Page generated in 0.33127 seconds
|