NSTextField(?) Dynamic size based on content
NSTextField(?) Dynamic size based on content
- Subject: NSTextField(?) Dynamic size based on content
- From: otherguy <email@hidden>
- Date: Fri, 27 Feb 2004 00:56:38 -0700
Hi everyone!
I need to do something similar to what Apple's done with Address Book
and the fields while they're in edit mode. Specifically how the fields
dynamically grow as you type into them. I was trying to figure out how
to do this with a NSTextField, but I cannot, for the life of me, find
any information on how to calculate the width in pixels of a formatted
string of text.
Would someone be kind enough to point me in the right direction? If I
should be using a NSTextView instead, is there a way to set the border,
or do I have to create a subclass or composite class? If I can do it
with a NSTextField, does anyone know how to calculate the proper width?
I've been plowing through several cocoa books on O'Reilly's Safari as
well as the Apple Documentation. Any recommendations for additional
resources are extremely welcome.
Thanks a ton!
-Cameron Wilhelm
email@hidden
P.S. Sorry if it's a bit of basic question - I'm still learning. ;)
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.