Printing NewText with parts of the text colored/bolded

PennController for IBEX Forums Support Printing NewText with parts of the text colored/bolded

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9927
    KateK
    Participant

    Hi again!

    I am having a couple of small hiccups in getting the aesthetics right for my experiment.

    After printing a question, I want the following text to print:

    “Please press
    F for YES [text in GREEN] (space) J for NO [text in RED]”

    Is there a way to put space between the two options and bold/color certain portions of the text?

    Thank you so much!
    Kate

    #9928
    Jeremy
    Keymaster

    Hi Kate,

    You can use HTML in Text elements, like this:

    newText("Please press<br><span style='color:green;margin-right:5em;'><strong>F</strong> for <strong>YES</strong></span> <span style='color:red;'><strong>J</strong> for <strong>NO</strong></span>")

    Jeremy

    #9930
    KateK
    Participant

    Hi Jeremy!

    This is great, thanks!

    Kate

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.