Hello!
Would you please tell me the efficient way to trim long text in status bar if window becomes rather small. Trim and add "..." at the end of trimmed text.

For example, I have a string like "longlonglongtext".
If main window of the application is maximized it's ok, but when user sized the window down need to have something like "longlonglo...".

By default, as I could see, the text is trimmed, but it would be nice to add these three dots at the end....

If the only way is to change the text manually how to find out how many characters to trim if the width of the window (in pixels) is known?