| Home 目次>ApplicationKit>NSFormCell | |
setAttributedTitle:
属性付き文字列をタイトルをセットします
-(void) setAttributedTitle:(NSAttributedString*)anAttributedString
【返り値】 | |
| void | なし |
| 【パラメータ】 | |
| anAttributedString | 属性付き文字列 |
【解説】
属性付き文字列をタイトルをセットします。
【例文】
#import "MyObject.h"
@implementation MyObject
- (NSDictionary*)boldFontAttributes {
return [NSDictionary dictionaryWithObject: [NSFont boldSystemFontOfSize:[NSFont systemFontSize]] forKey:NSFontAttributeName];
}
- (IBAction)myAction:(id)sender
{
[form1 setAttributedTitle: [[NSMutableAttributedString alloc] initWithString:@"newForm:" attributes:[self boldFontAttributes]]];
NSLog([[form1 attributedTitle] string]);
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSFormCell | 修正日2006.12.26 |