• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IKImageBrowserView - multiline labels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IKImageBrowserView - multiline labels


  • Subject: Re: IKImageBrowserView - multiline labels
  • From: Rob Keniger <email@hidden>
  • Date: Sun, 8 Feb 2009 13:41:42 +1000


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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >IKImageBrowserView - multiline labels (From: Eric Gorr <email@hidden>)

  • Prev by Date: Re: subpixel rendering vs. layer backed views
  • Next by Date: Re: Cocoa Event Monitor?
  • Previous by thread: IKImageBrowserView - multiline labels
  • Next by thread: Cocoa Event Monitor?
  • Index(es):
    • Date
    • Thread