• 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: NSOutlineView problem with Text cells.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView problem with Text cells.


  • Subject: Re: NSOutlineView problem with Text cells.
  • From: Corbin Dunn <email@hidden>
  • Date: Wed, 10 Dec 2008 09:20:46 -0800


On Dec 10, 2008, at 9:09 AM, Arun wrote:

Hi

I have an App in which i use NSOutlineView in the left hand side for
Navigational controls.
The Root and child's have text cells. I am have changed the font size for
the texts in the text cells.
After this the text in the cells are not aligned. The leave a lot of space
in the bottom and looks as if they were moved up.
This also happens in the NSTableView.
Is there any way in which i can allign the text to the center of the cells
so that the text exactly reside in the center and leaves equal spaces w.r.t
the text cell height.

Yes -- subclass the cell, and center the text before drawing it. You can override -drawInteriorWithFrame, adjust the frame so the text will be centered, and call super.


corbin
_______________________________________________

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: 
 >NSOutlineView problem with Text cells. (From: Arun <email@hidden>)

  • Prev by Date: Re: How Can I Notify DrawRect Method?
  • Next by Date: Re: How Can I Notify DrawRect Method?
  • Previous by thread: NSOutlineView problem with Text cells.
  • Next by thread: Re: NSOutlineView problem with Text cells.
  • Index(es):
    • Date
    • Thread