+ int size = 0, i;
+ NSArray *lines = [string componentsSeparatedByString:@"\n"];
+
+ for (i = 0; i < [lines count]; i++) {
+ int temp = [[lines objectAtIndex:i] sizeWithAttributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"Lucida Grande" size:12] forKey:NSFontAttributeName]].width;
+
+ if (temp > size) {
+ size = temp;
+ }
+ }
+
+ if (size < 255) {
+ size = 255;
+ }
+