Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSMutableAttributedString *result = [[[NSMutableAttributedString alloc] initWithString:value] autorelease];
- NSDictionary *attributes = [[NSDictionary dictionaryWithObjectsAndKeys:
- [NSFont systemFontOfSize:[NSFont systemFontSize] -1], NSFontAttributeName,
- [NSColor disabledControlTextColor], NSForegroundColorAttributeName, nil] retain];
- [result addAttributes:attributes range:[value rangeOfString:value]];
- NSString *titleValue = @"TEST";
- NSMutableAttributedString *titleString = [[NSMutableAttributedString alloc] initWithString:titleValue];
- NSColor *color = [self isHighlighted] ? [NSColor whiteColor] : [NSColor blackColor];
- NSDictionary *attributes = [[NSDictionary dictionaryWithObjectsAndKeys:
- [NSFont boldSystemFontOfSize:[NSFont systemFontSize] + 1], NSFontAttributeName,
- color, NSForegroundColorAttributeName, nil] autorelease];
- [titleString addAttributes:attributes range:[titleValue rangeOfString:titleValue]];
- [self setAttributedStringValue:value];
Add Comment
Please, Sign In to add comment