• 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: CustomView Help ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CustomView Help ...


  • Subject: Re: CustomView Help ...
  • From: "Kyle Sluder" <email@hidden>
  • Date: Fri, 14 Mar 2008 07:16:42 -0400

On 14 Mar 2008 11:07:55 +0000, Mic Pringle <email@hidden> wrote:
>  I just dragged the label icon from the palette in IB onto my custom view ?

Ditch the NSTextField that you're currently using (that's what the
"label" is) and do the drawing yourself.  AppKit does not support
overlapping views.  Since you're tying the color of the view/text to
the drag operation, which happens in a separate runloop mode, you will
have more consistent results this way.

AppKit adds -drawWithRect:options:attributes to NSString in a
category.  (See
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSString_AppKitAdditions/Reference/Reference.html
for documentation.)  You want to use this in concert with
-sizeWithAttributes: to draw the string centered in your view.

HTH,
--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: CustomView Help ...
      • From: Mic Pringle <email@hidden>
References: 
 >CustomView Help ... (From: email@hidden)
 >Re: CustomView Help ... (From: "Kyle Sluder" <email@hidden>)
 >Re: CustomView Help ... (From: Mic Pringle <email@hidden>)

  • Prev by Date: Re: What's the trick to eliminating 'halos' on buttons?
  • Next by Date: Re: CustomView Help ...
  • Previous by thread: Re: CustomView Help ...
  • Next by thread: Re: CustomView Help ...
  • Index(es):
    • Date
    • Thread