NSButtonCell problem -- Title ends up at bottom
NSButtonCell problem -- Title ends up at bottom
- Subject: NSButtonCell problem -- Title ends up at bottom
- From: Christoffer Karlsson <email@hidden>
- Date: Fri, 19 Dec 2003 05:34:42 +0100
Hi,
I am implementing a subclass of NSControl which manages several
NSCells, one of which is an NSButtonCell (configured to have a standard
push-button appearance). Unfortunately, the title ends up at the bottom
of the button no matter what settings I try (image position, button
type etc.). This is on 10.2.8 (I have not tried it on Panther). It
seems as if it might be related to a posting on the cocoa-pro list
(
http://cocoadevcentral.com/pipermail/cocoa-pro/2002-December/
000270.html).
By subclassing NSButtonCell and overriding titleRectForBounds: to add 5
points to the y-position of the titleRect I get the title to be
displayed in the correct position, this does however seem very fragile.
Any suggestions on what I might have missed? Since NSMatrix handles
NSButtonCells ok, it would seem more than likely that I might just have
made some stupid mistake (rather than there being a bug in
NSButtonCell).
--
Christoffer Karlsson
Vdntar pe Godot
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.