Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
d3v3l0p3r
Posts: 130
Registered: ‎07-19-2012
My Carrier: Carrier

How to know the Label text has been truncated?

Is there any way to find out whether text of a Label has been truncated. For example when text of a single line Label is too long to fit in the Container it is automatically truncated at the end by gradually fading text out (see attached photo). This is a neat feature of Cascades but in my code I need to make some adjustments when this happens. How can I find this out?

 

example.png

 

On similar note, is it possible to set property of Label to not truncate the text?

 

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
d3v3l0p3r
Posts: 130
Registered: ‎07-19-2012
My Carrier: Carrier

Re: How to know the Label text has been truncated?

Anyone?

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
Zmey
Posts: 886
Registered: ‎12-18-2012

Re: How to know the Label text has been truncated?

I could be wrong and can't check this right now, but I think multiline labels don't truncate text. Try switching the label to multiline by calling setMultiline(true). If that alone won't help, try adding a newline at the end.
Please use plain text.