Changing style of before and after text in scale

PennController for IBEX Forums Support Changing style of before and after text in scale

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7648
    ozgebakay
    Participant

    Hi Jeremy,

    I have the following code for a scale. With the css lines, I am able to change the font size and style of the scale labels. But I also want to change those for the before and after texts. Is there a way to do it? The before and after texts in the code below come from a csv file that I use in my template.

    newScale(7)
          .radio()
          .labelsPosition("bottom") 
          .before( newText("left", row.answer1) )
          .after( newText("right", row.answer2) )
          .css("font-size","24px")
          .css("font-family", "Helvetica, sans-serif")
          .log()
          .print()
          .wait()
    

    Thanks in advance,
    Özge

    #7657
    Jeremy
    Keymaster

    Hi Özge,

    You can use the same css commands on your Text elements:

    newScale(7)
        .radio()
        .labelsPosition("bottom") 
        .before( newText("left", row.answer1).css("font-size","24px").css("font-family", "Helvetica, sans-serif") )
        .after( newText("right", row.answer2).css("font-size","24px").css("font-family", "Helvetica, sans-serif") )
        .css("font-size","24px")
        .css("font-family", "Helvetica, sans-serif")
        .log()
        .print()
        .wait()
    

    Jeremy

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