Auto-resizing NSTextField
Chad Armstrong
edenwaith at mac.com
Tue Oct 23 20:33:16 PDT 2007
Hello:
I'm trying to subclass an NSTextField, so when the data is loaded
into it, the field resizes (vertically) so all of the data loads
properly.
I've found this bit of code and have been using it as an example:
http://www.cocoadev.com/index.pl?CCDGrowingTextField
I implemented my own version of this code, and when I try to tell the
NSTextField to resize, it gets to the method, but it doesn't react.
What I'm also finding, is that it isn't even setting the string any
longer!
So, this line used to work when the text field was a standard
NSTextField.
[myTextField setStringValue: myString];
Now, after I subclassed the text field, it does not even seem to
respond at all. Doesn't set the text, doesn't resize. Any tips on
what I'm missing or doing wrong?
Regards,
Chad
More information about the MacOSX-dev
mailing list