• 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: scale text proportionally as bounds increase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scale text proportionally as bounds increase


  • Subject: Re: scale text proportionally as bounds increase
  • From: Steve Mills <email@hidden>
  • Date: Mon, 23 Feb 2015 10:56:24 -0600

On Feb 23, 2015, at 10:49:36, sqwarqDev <email@hidden> wrote:
>
> I need some advice on how to approach a particular problem (OS X),
>
> I have a basic window with a couple of NSTextFields and Labels. What I want to do is have the user able to drag the window frame and have the text in the fields increase proportionally. I know I can get the frame of each NSControl within the superview to scale with AutoLayout, but that won't increase the text size within the NSControl.
>
> How do I programmatically tell each NSControl to increase its text size proportionally as its bounds increase?

I haven't tried this, but you should be able to hook the field's Font Size binding up to a custom NSValueTransformer, which would return a size based on a base minimum font size plus a scale factor based on the current dimension / minimum dimension.

--
Steve Mills
Drummer, Mac geek


_______________________________________________

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


References: 
 >scale text proportionally as bounds increase (From: sqwarqDev <email@hidden>)

  • Prev by Date: scale text proportionally as bounds increase
  • Next by Date: Re: get class of a method
  • Previous by thread: scale text proportionally as bounds increase
  • Next by thread: Re: scale text proportionally as bounds increase
  • Index(es):
    • Date
    • Thread