We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Changing label ellipsis based on visible text

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?

2
Contributors
2
Replies
2 Days
Discussion Span
1 Year Ago
Last Updated
3
Views
zachattack05
Posting Pro
575 posts since Dec 2009
Reputation Points: 66
Solved Threads: 16
Skill Endorsements: 0

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

dwarvenassassin
Light Poster
30 posts since Feb 2012
Reputation Points: 10
Solved Threads: 2
Skill Endorsements: 0

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.

zachattack05
Posting Pro
575 posts since Dec 2009
Reputation Points: 66
Solved Threads: 16
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0677 seconds using 2.83MB