On 08/02/2009, at 11:40 AM, Eric Gorr wrote:

I was wondering if anyone has used this control. I have a situation which it may be perfect for, but the three things I am not certain it is capable of is:

1. supporting in-place editing of the labels
2. supporting multi-line labels
3. using a smaller font in the labels

I have tried to figure out how to get it to do these things, but have been unable.

If it cannot, I intend to file bugs, but wanted to first verify these things weren't possible.


You can't do #1 and #2. Well, you can have a title and a subtitle on separate lines, but that's not the same thing as a multi-line title.

You can definitely do #3. To do this you have to give the image browser view an attributed string dictionary:

//set up the string attributes any way you like
NSDictionary* titleAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSFont systemFontOfSize:[NSFont smallSystemFontSize]], NSFontAttributeName, [NSColor whiteColor], NSForegroundColorAttributeName,
                                         nil];

//tell the image browser to use your attributes
[myIKImageBrowserView setValue:titleAttributes forKey:IKImageBrowserCellsTitleAttributesKey];

I agree that this is poorly documented. I also wonder why we have to use setValue:forKey: for many IKImageBrowserView settings instead of calling a method like -setTitleAttributes:, which would be the "normal" way to set these kinds of options.

--
Rob Keniger



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to