如何使NSTableView的唯一列占用TableView的所有宽度? [英] How can I have the only column of my NSTableView take all the width of the TableView?

查看:131
本文介绍了如何使NSTableView的唯一列占用TableView的所有宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试学习一些可可知识(使用用于Mac OS X的可可编程)。在其中一个练习中,我们设置了一个只有一列的NSTableView,以作为事物的列表。

I am currently trying to learn a bit of Cocoa (using the book Cocoa Programming for Mac OS X). In one of the exercises, we set up a NSTableView with only one column, to act as a list of things.

让我烦恼的是,在Interface Builder中,我找不到一种方法来使(仅)列始终占据NSTableView的整个宽度。结果,实际上总是只有两列时总是看起来好像有两列。

What annoys me is that in Interface Builder, I could not find a way to have the (only) column always take the full width of the NSTableView. As a consequence, it always somehow looks like there are 2 columns when there is actually only one.

任何想法吗?

推荐答案

这只是一个IB问题,一直在发生(我不确定为什么)。要解决此问题,只需将表格视图的大小调整为小于第二列的大小,然后将其拖回所需的大小,第二列将消失。

This is just an IB problem that happens all the time (I'm not sure why). To solve this, simply just resize the table view to the size smaller than the 2nd column, then drag it back to the size you want and the 2nd column will disappear.

这篇关于如何使NSTableView的唯一列占用TableView的所有宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆