Dynamic window size based on contents (NSTextViews or NSTextFields)
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.