12-03-2013 10:55 AM
Hi Everyone,
I'm trying to truncate a text control value with "..." at the end, whenever the value it holds is longer than the control can display.
Does anyone has an idea about how this can be done ?
I'm trying but not getting a simple way through properties and methods.
Unless I fix the text control width and its police. But for me, that mean anytime I would like to do anything similar, I'll have to repeat the process of counting how many characters the text control can hold.
Great Thanks to everyone.
Solved! Go to Solution.
12-03-2013 11:09 AM
You should be interested in this idea over on the Idea Exchange:Some indication that a string control isn't showing the entire string. Go ahead an give it a kudo.
12-03-2013 11:46 AM
Thanks Crossrulz...
12-03-2013 12:27 PM
I was thinking of something like this:
The problem I get is that the Width property seems to include the decorations and the other properties (TotalRectangle and MasterRectangle) require scripting and just got me confused. It might work to use a constant to account for the width of the control, but that doesn't lend itself to reuse. This uses an ellipsis in the control's caption and decides whether to show it based on the contents of the control.
12-03-2013 12:27 PM
@El-MDA wrote:
Hi Everyone,
I'm trying to truncate a text control value with "..." [...]
You're not looking to truncate, I think you're looking to append.
12-03-2013 06:06 PM
I use the following to estimate the maximum number of characters a display can contain and then process the string accordingly.