• 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: Resizing text views and flowing controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: NSCalendarDate picker widget?
  • Next by Date: Re: Stop dragging my <NSWindow> around
  • Previous by thread: Resizing text views and flowing controls
  • Next by thread: Using resources from Cocoa app
  • Index(es):
    • Date
    • Thread