NSFormCell:setAttributedTitle:
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


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSFormCell
修正日2006.12.26