standard.settings.color

getElement(id).settings.color(“color”) Makes any text in the element appear in the specified color. The “color” string follows CSS conventions (most common names such as “red”, “blue”, … are valid) Note: if you want to change the background color of an element (say, a ) use [js].settings.css(“background”, color)[/js] where color is the name of a color (e.g. …

standard.settings.center

getElement(id).settings.center() Makes the element appear centered on the horizontal axis. Example: [js highlight=”2″ try=”true”] newText(“helloworld”, “Hello world”) .settings.center() .print() [/js] Prints Hello world onto the screen, horizontally centered.

standard.settings.bold

getElement(id).settings.bold() Makes any text in the element appear boldfaced. Example: [js highlight=”2″ try=”true”] newText(“warnning”, “NOTE: this text is a warning!”) .settings.bold() .settings.italic() .settings.color(“red”) .print() [/js] Prints a text in boldface, italic and red.

standard.settings.before

or getElement(id).settings.before( getElement(id) ) Adds some content to the left of the element. Example: [js highlight=”6,12″ try=”true”] newImage(“bad”, “no.png”) , newImage(“good”, “ya.png”) , newText(“left label”, “Bad”) .settings.before( getImage(“bad”) ) , newText(“right label”, “Good”) .settings.after( getImage(“good”) ) , newScale(“judgment”, 5) .settings.before( getText(“left label”) ) .settings.after( getText(“right label”) ) .print() .wait() [/js] Creates two image and two …

standard.settings.after

getElement(id).settings.after( getElement(id) ) Adds some content to the right of the element. Example: [js highlight=”9,13″ try=”true”] newImage(“bad”, “no.png”) , newImage(“good”, “ya.png”) , newText(“left label”, “Bad”) .settings.before( getImage(“bad”) ) , newText(“right label”, “Good”) .settings.after( getImage(“good”) ) , newScale(“judgment”, 5) .settings.before( getText(“left label”) ) .settings.after( getText(“right label”) ) .print() .wait() [/js] Creates two image and two text …

standard.print

getElement(id).print() or getElement(id).print(x,y) (limited support in PennController 1.3, general since 1.4) or getElement(id).print(x,y,canvas) (limited support in PennController 1.3, general since 1.4) Adds the content of the element to the screen. This has no effect for non-visual elements such as the purely interactive . Since PennController 1.3, you can pass x and y values to print …

scale.test.selected

getScale(id).test.selected() or getScale(id).test.selected( value ) Tests whether a button is selected. If you pass a value, it will check that it matches the label of the selected button if it has a label, its index otherwise. If you do not pass a value, it simply checks that a selection happened. Example: [js highlight=”7″ try=”true”]newScale(“score”, 5) …

scale.settings.vertical

getScale(id).settings.vertical() (since beta 0.3) Makes the buttons and labels of the scale appear vertically, with the initially left-most value to the bottom and the initially right-most value on top. If you also use , top labels will accordingly appear on the right, and bottom labels will appear on the left. Example: [js highlight=”3″ try=”true”]newScale(“slider”, 100) …

scale.settings.slider

getScale(id).settings.slider() (since beta 0.3) Transforms the scale into a slider. Note that sliders always have a default value in order to place their cursor. If you do not use the settings command , the central (or next-to-central) value will be used. The Comments column of the results line will report how long it took to …

scale.settings.radio

getScale(id).settings.radio() Makes the buttons of the scales appear as radio buttons. Example: [js highlight=”3″ try=”true”]newScale(“score”, “Terrible”, “Bad”, “Good”, “Terrific”) .settings.before( newText(“left”, “The last movie I saw was “) ) .settings.radio() .settings.labelsPosition(“top”) .print() .wait() [/js] Adds a scale with 4 horizontally aligned radio buttons to the screen, with their respective labels appear on top of them, …