Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopUpButton - aligning to top vertically



Hi,

NSPopUpButton aligns its text and image, by default,
to the centre of its cell. Is there any easy way to
change this so that it is aligned to the text? I have
an outline view in which variable row heights are
allowed (using Tiger's -outlineView:heightOfRowByItem:
delegate method), and it looks very ugly with the
popup buttons aligned to the centre when text is
aligned to the top.

I am guessing that I will need to subclass
NSPopUpButtonCell to achieve this (in particular,
-drawWithFrame:inControlView:), but so far my attempts
have been very limited in their success.

Has anybody do something similar, or know how to do
this?

Many thanks in advance for any suggestions.

All the best,
Keith

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.