• 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
Dynamic window size based on contents (NSTextViews or NSTextFields)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic window size based on contents (NSTextViews or NSTextFields)


  • Subject: Dynamic window size based on contents (NSTextViews or NSTextFields)
  • From: Gerben Wierda <email@hidden>
  • Date: Sun, 8 Dec 2002 13:03:23 +0100

I would like to emulate the effect that NSBeginAlertSheet has, where depending on the size of a textfield or textview inside a panel, the panel changes size to accomodate for it. I have been looking at NSTextView and NSTextContainer and size tracking but it seems I cannot do what I want with it. (Or at least I fail to understand it).

I would like to have a NSTextField (with line wrapping) or NSTextView which has a fixed width and a height depending on the amount of text inside (which should be entirely visible).

I would also like to know what width a text field (without wrapping) will be depending on the text content.

In short, I would like to emulate the dynamic behaviour of the size of a sheet that you get when you use NSBeginAlertSheet.

Can someone give me a pointer?

Thanks,

G
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Cocoa Book
  • Next by Date: Re: Cocoa Book
  • Previous by thread: Re: Re: Cocoa Book
  • Next by thread: Java Bridge - Calling Java methods from Cocoa(Objective-C)
  • Index(es):
    • Date
    • Thread