|
|
|
Re: Resize one column when selected all rows [message #1730772 is a reply to message #1727582] |
Thu, 28 April 2016 07:50  |
Eclipse User |
|
|
|
Dirk Fauth wrote on Thu, 24 March 2016 08:28When you select all rows it also means you select all columns. You basically perform a select all. If you select multiple columns (full column selection) a resize is intended to resize all fully selected columns.
Quote:is it the right behavior?
From my understanding it is.
hmmm...
as we had the same issue a few weeks ago, I compared the NatTable behavior to Excel behavior.
While Excel can decide, whether a column is fully selected or all data rows are selected, NatTable cannot. It's quiet irritating, when you use a NatGridLayerPainter with full row selection and having a few rows only, so the NatTable gets "filled" with empty rows.
If you select all rows, there are still the empty rows, rendered by NatGridLayerPainter, that are not selected. But when you change a single column width, NatTable changes all the available columns to the same width, as all available data rows are selected 
When selecting all data rows in Excel - leaving the empty rows unselected - and changing a single column, only the single column will resize.
Dirk Fauth wrote on Thu, 24 March 2016 08:28Quote:is there any solution to help me only resize one column with when selected all rows?
That behavior is implemented in SelectionLayer#handleColumnResizeCommand(ColumnResizeCommand). If you expect a different behavior feel free to extend SelectionLayer and do whatever you expect that should happen.
We solved this by simply delegating the ColumnResizeCommand to the underlying layer in our own SelectionLayer implementation.
@Override
protected boolean handleColumnResizeCommand (ColumnResizeCommand pCommand)
{
return underlyingLayer.doCommand (pCommand);
}
Markus
|
|
|
Powered by
FUDForum. Page generated in 0.04791 seconds