Re: Resizing text views and flowing controls
Re: Resizing text views and flowing controls
- Subject: Re: Resizing text views and flowing controls
- From: Matt Neuburg <email@hidden>
- Date: Fri, 04 Feb 2005 09:23:01 -0800
On Fri, 4 Feb 2005 09:21:43 -0000, Oliver Donald <email@hidden>
said:
>I have a view in an application where, as a simple example, there is a
>multi-line label (NSTextField) under which sits a button.
>
>The problem is that when I resize the window the wrapping on the textfield
>changes, and sometimes the end of the text wraps of the bottom. Is there a
>simple way to get the textfield view to expand to hold all of the text? And
>also to move the controls below the textview down accordingly, in effect
>anchoring them to the base of the textview above?
The way to resize the textfield is to resize it. Its size is in your
control. Code for determining the height of a string given a wrapping width
has appeared here many times, so check the archives. The way to move the
controls below the textview is to move them. Their position in the window is
in your control. If you want to do this with a minimum number of commands,
put them all in superview and move that.
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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