Truncate the last line of multi-line NSTextField

后端 未结 2 1382
渐次进展
渐次进展 2021-01-01 02:42

I\'m trying to create a text field similar to Finder\'s file labels. I would like the last (second) line to be truncated in the middle.

I started with a multi-line <

2条回答
  •  臣服心动
    2021-01-01 03:41

    I suspect there are two labels there. The top one contains the first 20 characters of a file name, and the second contains any overflow, truncated.

    The length of the first label is probably restricted based on the user's font settings.

提交回复
热议问题