[英]Paint a more thick edge of each n cells in a nattable and set a color
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.