• 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: Underlining text in Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Underlining text in Interface Builder


  • Subject: Re: Underlining text in Interface Builder
  • From: Adil Saleem <email@hidden>
  • Date: Wed, 5 Nov 2008 05:58:57 -0800 (PST)

I don't get it. If a user can not underline the text directly from interface builder, then why is the option given in the font window ?
 
Adil
 


--- On Tue, 11/4/08, Jonathan Hess <email@hidden> wrote:

From: Jonathan Hess <email@hidden>
Subject: Re: Underlining text in Interface Builder
To: email@hidden
Cc: email@hidden
Date: Tuesday, November 4, 2008, 12:09 PM

Hey Adil -

A text label in Interface Builder is an NSTextField, which has an
NSTextFieldCell. NSTextFieldCell has three related properties, stringValue,
font, and attributedStringValue. When the cell has just a stringValue, and a
font, it combines the two during drawing to draw the string with the specified
font. An attributed string is a much richer combination of a string and styling
directives, when a text field cell has a specified attributed string value, it
will use that for drawing. Even though the underlining attribute is present on
the font panel, it isn't actually a property of fonts. Instead, underlining
is an attribute that you can specify for a range of characters in an attributed
string independent of the font. In order to have a NSTextField/NSTextFieldCell
pair with underlined text, you would need to use the attributed string instead
of the simple string + font. Unfortunately, Interface Builder only supports
configuring the string and font, not the attributed string.

I suggest filing an enhancement request at http://bugreport.apple.com/

Jon Hess

On Nov 4, 2008, at 12:37 AM, Adil Saleem wrote:

> Hi,
>
> I am trying to underline a static text in Interface Builder (through fonts
window), but it does not underline the text. I don't understand why. Any
ideas ?
>
> Thanx
>
>
>
> _______________________________________________
>
> 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





_______________________________________________

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: Underlining text in Interface Builder
      • From: Graham Cox <email@hidden>
References: 
 >Re: Underlining text in Interface Builder (From: Jonathan Hess <email@hidden>)

  • Prev by Date: Re: Wrapping of text around an image or shape.
  • Next by Date: Re: Wrapping of text around an image or shape.
  • Previous by thread: Re: Underlining text in Interface Builder
  • Next by thread: Re: Underlining text in Interface Builder
  • Index(es):
    • Date
    • Thread