The new PCIbex Farm is here! Be sure to check out all of its new features and changes.

Link Search Menu Expand Document

scale.keys

description

Respectively associates the scale’s options with the specified keys for selection.

syntax

getScale(ELEMENT_NAME).keys(key1, key2, ...)
  • key1 :
  • key2 :
  • ... :

notes

  • If you pass no argument, will check whether your scale’s options are all single characters and, if so, will use them as keys. If not, will respectively associate the scale’s options with the numeric keys.

example(s)


@newScale("grade",  "A", "B", "C", "D", "E", "F")
@    .labelsPosition("top")
$    .keys()
@    .print()
@,
@newScale(9)
@    .before( newText("Confidence:") )
$    .keys()
@    .print()
@,
@newScale("role",  "TA", "Professor")
@    .labelsPosition("right")
$    .keys("T", "P")
@    .print()
  • Will add three scales onto the screen. Pressing A, B, C, D, E or F will select an option on the first scale, pressing a numeric key from 1 to 9 will select an option on the second scale, and pressing T or P will select an option on the third scale.