NSTableView摆脱空格分隔列 [英] NSTableView get rid blank space separating columns
本文介绍了NSTableView摆脱空格分隔列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有4列的NSTableView.我还为每行设置了自定义背景色.唯一的问题是,我在这些丑陋的白色空间中,网格线会在水平和垂直轴上移动.我都未选中IB,但它们仍然出现.如何摆脱垂直的颜色,改变水平的颜色和大小?
I have an NSTableView with 4 columns. I also have a custom background color for each row. The only problem is I have these ugly white spaces where the gridlines would go in both the horizontal and vertical axis. I have both unchecked in IB, but they still show up. How can I get rid of the vertical ones and change the color and size of the horizontal ones?
这是我看到的: 替代文本http://img815.imageshack.us/img815/9030/homex.png
推荐答案
要摆脱垂直空间,但保持水平空间:
To get rid of vertical spaces but keep the horizontal ones:
[yourTableView setIntercellSpacing:NSMakeSize(0.0, 2.0)];
See Apple documentation for more details.
这篇关于NSTableView摆脱空格分隔列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文