• 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
NSTextView moves when being resized ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView moves when being resized ???


  • Subject: NSTextView moves when being resized ???
  • From: Anders Lassen <email@hidden>
  • Date: Sat, 29 Aug 2009 12:38:33 +0200

Hi,

I am working on a custom view that consists of a column of several NSTextViews. In between, there are graphics and some other stuff that require special editing.

Therefore I cannot use a single NSTextView.

The NSTextView must adopt its height to the content. This works fine using the code as listed below.

But the problem is, that the NSTextView control moves downwards when the size is changed.

textView = [[NSTextView alloc] initWithFrame:NSMakeRect(100, 100, 300, 200)];

   [self addSubview:textView];

   [textView setVerticallyResizable:YES];

   [textView setAutoresizingMask NSViewHeightSizable];

   [textView setMinSize:NSMakeSize(0.0, 100.0)];
   [textView setMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];


I have read about others having the same problem, but I did not find a solution.


Note that the NSTextView is a subview to a custom view, that is the content view of a NSScrollView. But this does not matter - I think.

Hope someone can help on this.

Kind regards,

Anders Lassen


_______________________________________________

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: NSTextView moves when being resized ???
      • From: Reinhard Segeler <email@hidden>
    • Re: NSTextView moves when being resized ???
      • From: Reinhard Segeler <email@hidden>
  • Prev by Date: Re: libcrypto on Snow Leopard
  • Next by Date: How to extract the "Artist" information of an song file?
  • Previous by thread: NSCoder Chicag Reminder - Monday Night
  • Next by thread: Re: NSTextView moves when being resized ???
  • Index(es):
    • Date
    • Thread