• 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
How to draw correct underline ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to draw correct underline ?


  • Subject: How to draw correct underline ?
  • From: Eric Morand <email@hidden>
  • Date: Thu, 25 Aug 2005 11:20:33 +0200

Hi list !

In the process of underlining the text string of a control, I've noticed that the underline is pretty ugly.

Using the following string attributes :

highlightedStringAttributes = [[NSDictionary dictionaryWithObjectsAndKeys:[self font], NSFontAttributeName, [NSColor blackColor], NSForegroundColorAttributeName, [NSNumber numberWithInt:1], NSUnderlineStyleAttributeName, nil] retain];


...the underline drawn under the string when using...


[[self title] drawInRect:textRect withAttributes:stringAttributes];



...is gray (not even constant gray !) instead of black and is not 1 point high but 2 !




Is there a way to draw a correct underline ?


Thanks by advance,

Eric.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Alloc Mocks my World
  • Next by Date: Who call observers for any event.
  • Previous by thread: Re: Change Budle Identifier, then lost defaults
  • Next by thread: Re: How to draw correct underline ?
  • Index(es):
    • Date
    • Thread