开发者

Limiting the text length in a cell in NSTableView column

开发者 https://www.devze.com 2023-03-31 06:35 出处:网络
I have a NSTableView with 2 columns. I do have code to开发者_C百科 enter text in the cells for each row.

I have a NSTableView with 2 columns. I do have code to开发者_C百科 enter text in the cells for each row. Is there a way to limit the number of characters entry in the cell say max upto 10?


You can't tell the cell self to cut the NSString. But you can cut the inputString

cell.textLabel.text = [yourString substringToIndex:10];
0

精彩评论

暂无评论...
验证码 换一张
取 消