Re: Smooth resizing of a text field

2011-08-05 Thread Duncan Champney
On 20 Jul 2011, at 2:30 PM, Gabriel Roth wrote: > Subject: Smooth resizing of a text field > Date: July 20, 2011 3:30:56 PM EDT > To: Cocoa-dev@lists.apple.com > > > My application displays a non-editable text string in an NSTextField. When > the user adjusts a slider, the

Smooth resizing of a text field

2011-07-21 Thread Craig Mason-Jones
Don't fiddle with the individual properties of the subviews in the window. Rather, just apply a scaling transform to the entire window, and let Core Graphics take care of the rest. i.e. do what you really mean to do: scale everything. Unfortunately I've just upgraded to Lion ( :-) ) so I'm now bus

Subject: Re: Smooth resizing of a text field

2011-07-21 Thread Duncan Champney
On 20 Jul 2011, at 2:30 PM, Gabriel Roth wrote: > My application displays a non-editable text string in an NSTextField. When > the user adjusts a slider, the entire window and all its subviews—including > this text field—should resize smoothly. > > My first thought was to bind the font size of t

Re: Smooth resizing of a text field

2011-07-20 Thread Gabriel Roth
On Wed, Jul 20, 2011 at 4:12 PM, Fritz Anderson wrote: > > A couple of minutes' search turned up drawCenteredShrinkingToFitInRect: in > NSAttributedString-OAExtensions. I don't think it's on-point for what you're > looking for, but you may be able to derive a technique. To report back: With som

Re: Smooth resizing of a text field

2011-07-20 Thread Fritz Anderson
On 20 Jul 2011, at 2:30 PM, Gabriel Roth wrote: > My next thought was to convert the text field into an image (at some large > font size) and then scale the image up and down as the slider moves. But I > can't figure out how to create an image from a text field (or otherwise > generate an image of

Smooth resizing of a text field

2011-07-20 Thread Gabriel Roth
My application displays a non-editable text string in an NSTextField. When the user adjusts a slider, the entire window and all its subviews—including this text field—should resize smoothly. My first thought was to bind the font size of the text field to a property and have that property set to a