Forum Discussion

squirreltown's avatar
squirreltown
Roku Guru
13 years ago

TextScreen

Discovered on the Wiki there is something called a roTextscreen, can someone post how to use it?
this doesn't work, and none of the links work on the wiki.
thanks

Edit - found the IfTextScreen page, still doesn't show when called from an info dialog button. (have all the colors set in theme)

Function Textscr()

texscr = CreateObject( "roTextScreen" )
texscr.setmessageport(m.port)
texscr.SetTitle("TITLE")
texscr.SetHeaderText("HEADER")
texscr.SetText("testtestetste")
texscr.show()


End Function

7 Replies

  • As soon as your function exits, the local variable texscr will be destroyed, at which point the screen will disappear. So the screen will appear for only a split second, if at all. You need a message loop to maintain the screen after the Show.

    --Mark
  • Ok got this working but the text is tiny. On third the size of any other text in the interface. It doesn't seem like Text:atttr can be used according to the docs, has this changed?

    thanks
  • roTextScreen is meant for displaying large chunks of text like licenses and user agreements. I don't think you can change the size of the text. You might try a roParagraphScreen instead.

    The textAttrs attribute of the content-meta-data structure is used with roImageCanvas as described in Table 3 of the Component Reference (http://sdkdocs.roku.com/display/sdkdoc/ ... +Meta-Data).
  • "RokuChris" wrote:
    roTextScreen is meant for displaying large chunks of text like licenses and user agreements ---That no one ever reads----. I don't think you can change the size of the text. You might try a roParagraphScreen instead.


    Thank you Chris, apoligies for ammending your quote. Smiley LOL
  • destruk's avatar
    destruk
    Streaming Star
    Generalization isn't a good thing - much like stereotypes. The license agreements are in fact, read by lawyers - meaning someone reads them. 🙂
    I have used the roTextScreen to put up a user-accessible list of application changes since the prior revision. When there are a lot changes, it's nifty to be able to scroll down through the changelog rather than having multiple paragraph screens to contain all the information.