When I put a long string inside my NSTableView the text isn't displayed wholly:
I need to allow user to see the whole string (maybe with scroll or tooltip, it doesn't matter). Any suggestions?
preguntado el 30 de enero de 12 a las 19:01
If it is ok to have a multiline text view, this would be the easiest solution. But from your example I guess the answer is no.
You could embed the NSTextField in a scroll view. If the text is longer than the allowed width, you could simply show the scroll handles. If not, they would not be shown and the user doesn't even see that it's a scroll view.
For both of the above examples, it will be helpful to know how long the text actually is and if the textfield is long enough to display the whole text.
Tu puedes hacer
[textField sizeToFit] y
[textField frame].size.width verificar.