简体   繁体   English

在nattable中为每个n个单元格绘制更厚的边缘并设置颜色

[英]Paint a more thick edge of each n cells in a nattable and set a color

a) How to paint a more thick edge of each two cells horizontally? a)如何水平绘制每两个单元格的更粗的边缘?
b) and each 2 or 3 cell vertically? b) 和每个 2 或 3 个单元垂直?
c) how can i set the borders color ? c) 如何设置边框颜色?

Thanks in advance.提前致谢。


Example例子

To render a border only one one side of a cell you need to configure the CustomLineBorderDecorator around your content painter.要仅渲染单元格的一侧边框,您需要在内容绘制器周围配置CustomLineBorderDecorator Additionally you need to apply a special label to the cells that should show such a border, that indicates which borders to paint.此外,您需要将特殊标签应用于应显示此类边框的单元格,以指示要绘制的边框。 These labels are defined in CustomLineBorderDecorator itself.这些标签在CustomLineBorderDecorator本身中定义。

The color of the border can either be set statically on creating the CustomLineBorderDecorator or dynamically via style attributes.边框的颜色可以在创建CustomLineBorderDecorator静态设置,也可以通过样式属性动态设置。

To have this only for specific columns and rows use labels.要仅针对特定的列和行使用标签。 This is explained in our Getting Started Tutorial or ourStyling documentation .这在我们的入门教程或我们的样式文档中进行了解释

The NatTable project provides an Example Application that gives various examples for all the configuration possibilities and features supported. NatTable 项目提供了一个示例应用程序,它为所有支持的配置可能性和功能提供了各种示例。 The requested feature is for example shown in _4222_CellPainterExample例如,请求的功能显示在_4222_CellPainterExample

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM