realizable row header width [message #1009784] |
Fri, 15 February 2013 12:55  |
Eclipse User |
|
|
|
Hi all,
is there a way to make the row header width realizable by the user? I know how to set the row header
with but then its fixed.
The row header layer as is at the moment.
public RowHeaderLayerStack(IDataProvider dataProvider, BodyLayerStack pBodyLayer) {
DataLayer dataLayer = new DataLayer(dataProvider, 200, 20);
dataLayer.setColumnsResizableByDefault(true);
RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(dataLayer, pBodyLayer,
pBodyLayer.getSelectionLayer());
setUnderlyingLayer(rowHeaderLayer);
}
But setColumnsResizableByDefault() does not have an effect.
any hints are appreciated, Martin
|
|
|
|
Re: realizable row header width [message #1010836 is a reply to message #1010768] |
Mon, 18 February 2013 05:10  |
Eclipse User |
|
|
|
Hi Dirk,
yah sorry for the typo. I mean resizeable ...
Your solution works great! Thanks. I just changed the GridRegion to ROW_HEADER and add the
configuration to the table.
natTable.addConfiguration(new AbstractUiBindingConfiguration() {
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
// Mouse move - Show resize cursor
uiBindingRegistry.registerFirstMouseMoveBinding(new ColumnResizeEventMatcher(SWT.NONE,
GridRegion.ROW_HEADER, 0), new ColumnResizeCursorAction());
uiBindingRegistry.registerMouseMoveBinding(new MouseEventMatcher(), new ClearCursorAction());
// Column resize
uiBindingRegistry.registerFirstMouseDragMode(new ColumnResizeEventMatcher(SWT.NONE,
GridRegion.ROW_HEADER, 1), new ColumnResizeDragMode());
uiBindingRegistry.registerDoubleClickBinding(new ColumnResizeEventMatcher(SWT.NONE,
GridRegion.ROW_HEADER, 1), new AutoResizeColumnAction());
uiBindingRegistry.registerSingleClickBinding(new ColumnResizeEventMatcher(SWT.NONE,
GridRegion.ROW_HEADER, 1), new NoOpMouseAction());
}
});
Martin
schrieb Dirk Fauth, Am 18.02.2013 08:57:
> Hi,
>
> what do you mean with realizable? Or do you mean resizable?
>
> If you want to make your RowHeader resizable in terms of cell width you need to register the ui
> bindings for that. Have a look at the DefaultColumnResizeBindings to see what bindings that are.
>
> Hope that helps, Dirk
|
|
|
Powered by
FUDForum. Page generated in 0.03531 seconds