Hi,
my cell doesn't display newline chars. It returns YES in the wraps-override. I
tried all newline chars including the unicode one. Nothing shows. Please, can
someone help?
Thanks
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
<snip>
[style setAlignment:NSLeftTextAlignment];
attr = [NSDictionary
dictionaryWithObjectsAndKeys:style,NSParagraphStyleAttributeName,topLineFont,NSFontAttributeName,topLineColor,NSForegroundColorAttributeName,nil];
[displayID drawInRect:bgRectLineAContent withAttributes:attr];
NSRect lineBodyFrame = cellFrame;
lineBodyFrame.origin.x = 0;
lineBodyFrame.size.height -= bgRectLineA.size.height;
lineBodyFrame.origin.y = cellFrame.origin.y+bgRectLineA.size.height;
NSMutableString *displayString = [NSMutableString string];
// [displayID appendString:[[self objectValue] objectForKey:@"source"]];
// [displayID appendString:@" "];
sortedArray = [NSArray arrayWithArray:[[self objectValue] allKeys]];
sortedArray = [sortedArray
sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
for (NSString *thisOne in sortedArray){
if ([thisOne length]>6 && [[thisOne substringToIndex:6]
isEqualToString:@"qdesc_"]){
if ([[[self objectValue] objectForKey:thisOne] length]>0){
// if ([displayString length]>0)
[displayID appendString:@"\r"];
[displayString appendString:[[self objectValue]
objectForKey:thisOne]];
}
}
}
[style setAlignment:NSLeftTextAlignment];
attr = [NSDictionary
dictionaryWithObjectsAndKeys:style,NSParagraphStyleAttributeName,bodyFont,NSFontAttributeName,topLineColor,NSForegroundColorAttributeName,NSLineBreakByClipping,NSParagraphStyleAttributeName,nil];
[displayString drawInRect:lineBodyFrame withAttributes:attr];
}
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]