Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
meekum
Channel Surfer

[Solved] is "isTextEllipsized" still not working riight?

In an old post

https://community.roku.com/t5/Roku-Developer-Program/Label-isTextEllipsized-always-returns-false/m-p...

someone stated that isTextEllipsized is set when the text is loaded, but that doesn't seem to be ghe case in my case.  I'm doing this in a callback for an itemContent with an onChange="onLoadFunction".  When inserting a "? m.dscr" the text is displayed but isTextEllipsized is false, whether it actually is or not.  I tried this print statement as the last statement in this function.  However, if I do the print statement in onKeyEvent(), it is set properly.  I wonder if the fact that I'm still in the callback function has anything to do with it.  What I'm trying to do is set the text opacity to a reduced value if the text is truncated.  In the above post, it was suggested to do an observeField.. I didn't try it but doubt it would work.

I noticed another odd quirk.  When I print the label, all label-related fields repeat.  That is, "text", "isTextEllipsized", etc are all listed twice.

0 Kudos
1 REPLY 1
meekum
Channel Surfer

Re: is "isTextEllipsized" still not working riight?

After determining what the poster meant I solved the immediate problem.  I inserted a command

  

m.dscr.observeField("isTextEllipsized", "dscrEllipsisChanged")

and got the results I wanted.

Still wondering why the fields are duplicated

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.