Is it possible to transform a label's ellipsis text based on the text displayed on the screen?

For example, if the labels text is constructed from multiple strings and only 2 of the 5 are displayed, can the ellipsis text display "...and 3 others" or something like that?

I have the logic in my head to get the count information, I just need to know how is it possible to get the displayed text value and change the ellipsis text? Or would I need to get the displayed text and remove a certain number of characters and replace the entire string with the displayable data and append my "custom" ellipsis data to it and basically not use the auto ellipsis property?

Recommended Answers

All 2 Replies

AFAIK Auto-Ellipsis only appends ... to the end of the string.

It's appended to the end of the visible text on the screen, if you anchor your label to the left and right side and resize the form the ellipsis appears and disappears. I'm looking for a way to change the "..." ellipsis text to something that is computed based on the visible text on the screen.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.