Search code examples
rokumultistylelabel

MultiStyleLabel with Ellipsis


I'm not sure if I've found a Roku bug. I'm using a MultiStyleLabel. It extends LabelBase. LabelBase supports an ellipsis for text that extends beyond a boundary.

I was using a standard Lablel object (which also extends LabelBase). It was showing an ellipsis correctly for longer text. I then switched to using a MultiStyleLabel and it no longer shows an ellipsis for the same text. I have all of the proper component settings and did not change any during the conversion to MultiStyleLabel.

I tried extending MultiStyleLabel in the hopes of finding a workaround, but, I've had no success.

Has anyone encountered this and come up with a workaround?


Solution

  • There is no issue with MultiStyleLabel. Couple of fields should be checked whether set correctly--

    • wrap should be false
    • width should be defined
    • text length should be greater then width in pixels

    As you can see in image, it's ellipsis as expected-- enter image description here

    Please share the code snippet for better help.