Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Setting a Box’s Title

You can have a box with no title or with a title positioned in one of six places. To set the title’s location, use setTitlePosition: with one of options listed below. By default, it’s NSAtTop.

NSAboveTopNSAboveTop

NSAtTopNSAtTop

NSBelowTopNSBelowTop

NSAboveBottomNSAboveBottom

NSAtBottomNSAtBottom

NSBelowBottomNSBelowBottom

NSNoTitleNSNoTitle

To set the title’s font, use setTitleFont:. By default, it’s the Control Content font, which you can set in the Fonts tab of the Appearance panel in the Preferences application. Note that the title appears inside the box, so changing the size of the font will affect the size of the box’s content rectangle.

To set the title, use setTitle:. By default, it’s “Title”. If the title is longer than the box’s width, the title is clipped.



< Previous PageNext Page > Hide TOC


Last updated: 2003-02-15




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice