设置行高/行距在NSTextView [英] Setting the Line Height/ Line Spacing in an NSTextView

查看:523
本文介绍了设置行高/行距在NSTextView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么会在设置行高或行距的 NSTextView (即有多高每行,或多少空间是每行之间)?

How would I set the Line Height or Line Spacing in an NSTextView (i.e. how tall each line is, or how much space is between each line)?

推荐答案

使用了 - (无效)setDefaultParagraphStyle:在你的NSTextView(NSParagraphStyle *)paragraphStyle 方法

在<一个文档href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSParagraphStyle%5FClass/Reference/Reference.html#//apple%5Fref/doc/c%5Fref/NSParagraphStyle">NSParagraphStyle

在<一个文档href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSMutableParagraphStyle%5FClass/Reference/Reference.html#//apple%5Fref/occ/instm/NSMutableParagraphStyle">NSMutableParagraphStyle

有一个 setLineSpacing:在NSMutableParagraphStyle 方法。也有与行高的方法,该NSMutableParagraphStyle文档中的设置其他样式信息项下的方法应该是有用的。

There is a setLineSpacing: method in NSMutableParagraphStyle. There are also methods relating to line height, the methods under "Setting Other Style Information" in the NSMutableParagraphStyle documentation should prove useful.

我想这就是你要找的内容。 =]

I think that's what you're looking for. =]

这篇关于设置行高/行距在NSTextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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