NSTextField width detection
NSTextField width detection
- Subject: NSTextField width detection
- From: Jeremy Jurksztowicz <email@hidden>
- Date: Sun, 6 Oct 2002 14:14:53 -0400
Hello,
After searching the archives and the internet I am still having trouble
with this.
I would like to know how to find out how much of a string an NSTextField
of
fixed size can hold. In particular I have a field which holds a file
path, and I want
to trim large paths to fit in my field. For Example:
Actual Path: "/Users/MyUserName/Documents/SomeFile.extension"
Sized To Fit: "../Documents/SomeFile.extension"
I have found no way of finding out how much an NSTextFeild can hold.
I have thought of just using a fixed width font and counting the number
of
characters that can fit in IB, but that would look ugly.
Any Help or pointers to code would be much appreciated. Thank You.
Jeremy J.
_______________________________________________
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.