Set Custom Variant for TableColumn not working. [message #931047] |
Tue, 02 October 2012 22:06 |
George R Malary Messages: 36 Registered: March 2012 Location: New Jersey |
Member |
|
|
I have a stylesheet with the following variants:
TableColumn-SortIndicator, TreeColumn-SortIndicator {
background-image: url( icons/sort_indicator.png );
}
TableColumn-SortIndicator.nonSortableColumn, TreeColumn-SortIndicator.nonSortableColumn {
background-image: none;
}
I have all columns showing a sort indicator with an up/down arrow shaded gray. Some columns are not sortable, and I would like to hide the sort indicator. So the styling in the css file above works to show the sort indicator. And on the column that is not sortable, I set the custom variant as follows:
TableViewerColumn col = new TableViewerColumn(this,SWT.NONE, columnIndex);
col.getColumn().setData(WidgetUtil.CUSTOM_VARIANT, "nosSortableColumn");
The column still shows the sort indicator. I am setting other custom variants this way, and the styling is respected, is there a reason this is not the case here?
|
|
|
Re: Set Custom Variant for TableColumn not working. [message #931511 is a reply to message #931047] |
Wed, 03 October 2012 09:17 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi,
the customVariant set on the column is not applied to the SortIndicator.
If you need this functionality, please file an enhancement request.
Thanks,
Ivan
On 10/3/2012 1:06 AM, George R Malary wrote:
> I have a stylesheet with the following variants:
>
>
> TableColumn-SortIndicator, TreeColumn-SortIndicator {
> background-image: url( icons/sort_indicator.png );
> }
>
> TableColumn-SortIndicator.nonSortableColumn,
> TreeColumn-SortIndicator.nonSortableColumn {
> background-image: none;
> }
>
>
>
> I have all columns showing a sort indicator with an up/down arrow
> shaded gray. Some columns are not sortable, and I would like to hide
> the sort indicator. So the styling in the css file above works to
> show the sort indicator. And on the column that is not sortable, I
> set the custom variant as follows:
>
>
>
> TableViewerColumn col = new TableViewerColumn(this,SWT.NONE,
> columnIndex);
>
> col.getColumn().setData(WidgetUtil.CUSTOM_VARIANT, "nosSortableColumn");
>
>
> The column still shows the sort indicator. I am setting other custom
> variants this way, and the styling is respected, is there a reason
> this is not the case here?
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: Set Custom Variant for TableColumn not working. [message #931528 is a reply to message #931047] |
Wed, 03 October 2012 09:31 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
BTW... here is the bug about this issue:
362166: [Theming] Let sub-widgets inherit styles and custom variants
https://bugs.eclipse.org/bugs/show_bug.cgi?id=362166
On 10/3/2012 1:06 AM, George R Malary wrote:
> I have a stylesheet with the following variants:
>
>
> TableColumn-SortIndicator, TreeColumn-SortIndicator {
> background-image: url( icons/sort_indicator.png );
> }
>
> TableColumn-SortIndicator.nonSortableColumn,
> TreeColumn-SortIndicator.nonSortableColumn {
> background-image: none;
> }
>
>
>
> I have all columns showing a sort indicator with an up/down arrow
> shaded gray. Some columns are not sortable, and I would like to hide
> the sort indicator. So the styling in the css file above works to
> show the sort indicator. And on the column that is not sortable, I
> set the custom variant as follows:
>
>
>
> TableViewerColumn col = new TableViewerColumn(this,SWT.NONE,
> columnIndex);
>
> col.getColumn().setData(WidgetUtil.CUSTOM_VARIANT, "nosSortableColumn");
>
>
> The column still shows the sort indicator. I am setting other custom
> variants this way, and the styling is respected, is there a reason
> this is not the case here?
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04616 seconds