设计 smartgwt TreeGrid 的样式
我已经花了很长的时间来设计某个树形网格,试图让它看起来不像树形网格:D 我已经删除了连接线、打开/关闭按钮、图标,只包含文本和缩进。
但是,由于某种原因,当我将鼠标悬停在一行上时,背景仍然会变为阴影,就像当您越过一行时在任何常规列表网格上一样。看起来它是在我平常的行之上的一层。有什么想法可以完全禁用此行为并仅依赖 CSS 吗?
然后,第二个问题:如何在 TreeGrid 中的行/节点之间创建边距?每个项目都有一个由 CSS 设置的边框,我无法设法使后续行不粘在一起。我需要在它们之间添加一些像素。
谢谢!
I have come a long way styling a certain treegrid, attempting to make it not look like a treegrid :D I've removed the connector lines, open/close buttons, icons to only have text and indentation.
However, for some reason when I hover a row, the background still changes to an shade, just like on any regular listgrid when you go over a row. It looks like it's a layer coming over my usual row. Any ideas how to disable this behaviour alltogether and only rely on CSS?
Then, a second issue: how can I create a margin between the rows/nodes in my TreeGrid? Each item has a border set by CSS, and I can't manage to make subsequent rows not sticking together. I need a few pixels in between them.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不想将鼠标悬停在 TreeNode 上然后禁用它。
yourGrid.setShowRollOver(false);
对于第二个问题,我想你只需要增加单元格的高度。
yourGrid.setCellHeight(40);
you don't want hover on TreeNode then disable it.
yourGrid.setShowRollOver(false);
for second issue, i guess you just need to increase the height of cell.
yourGrid.setCellHeight(40);
对于你的第一个问题:你可以使用以下内容:
你也可以看看这个 链接。
除此之外,ListGrid中还有很多与样式相关的属性,例如:
&还有更多。您应该尝试它们来实现您想要的树外观。
For your first question: you can use the following:
You may also take a look at this link.
Besides there are so many properties related to style in ListGrid such as following:
& many more. You should try them to achieve your desired look for the Tree..