在Xcode 4中调整NSTextField的大小以适合默认字体? [英] Resizing NSTextField within Xcode 4 to fit default font?
问题描述
在XCode 4中,如果更改NSTextField的字体,则其框架不会更新以适应该更改.此外,在框架布局"下,其高度显示为灰色且不可更改.有没有一种快速的方法可以调整NSTextField的框架以适应其字体选择,而不必诉诸程序化调整?希望我忽略了Xcode 4中的一个简单控件.
In XCode 4, if I change the font of an NSTextField its frame does not update to accommodate the change. Further, under "Frame layout" its height is grayed-out and unalterable. Is there a quick way to adjust the frame of the NSTextField to fit its font choice without having to resort to a programmatic adjustment? Hopefully I have overlooked a simple control in Xcode 4.
推荐答案
我发现了一个有点尴尬的解决方案:通过将换行符"设置为自动换行",可以调整NSTextView在Size中的高度.检查员.完成后,我只是恢复了换行"配置.
I found a somewhat awkward solution: by setting the "Line break" to "Word wrap" I was allowed to adjust the the height of the NSTextView in the Size inspector. I simply restored my "Line break" configuration when done.
这篇关于在Xcode 4中调整NSTextField的大小以适合默认字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!