"SelectPair" (Question Interface Type)
"SelectPair" (Question Interface Type)
"SelectPair"
Provides two menus to select one value and category from.
Properties
- In QuestionInterface["SelectPair",props], props is an Association that supports the following keys:
-
"Prompt" None text asking the user a question "Left" required values available for selection "Right" required classifications available for selection - Additionally, options for PopupMenu are supported, including:
-
Background Automatic input field background color "DefaultLabel" Null expression to display when field is empty FieldSize {{{{5,Infinity},{1,Infinity}}}} the size of the input field - For a PopupMenu setting optvalue, the following forms of value are supported:
-
expr use expr for all fields {expr1, expr2} use the expri in order for each field
Corresponding AssessmentFunction
- Except for limited special cases, "SelectPair" is the automatically assigned interface type for an AssessmentFunction of the form AssessmentFunction[{k1<|"Category"c1|>,k2<|"Category"c2|>,k3<|"Category" c3|>,…}].
Examples
open all close allBasic Examples (2)
Create a select pair interface:
QuestionObject[QuestionInterface["SelectPair", <|"Prompt" -> "Select the type of pet you have and their age:", "Left" -> {"Cat", "Dog", "Fish", "Plant"}, "Right" -> Range[20]|>]]Create a select pair question with assessment:
QuestionObject["Pick your favorite exercise and whether it is aerobic/anaerobic.", AssessmentFunction[{"Running" -> <|"Category" -> "Aerobic"|>, "Swimming" -> <|"Category" -> "Aerobic"|>, "Weightlifting" -> <|"Category" -> "Anaerobic"|>, "Interval Training" -> <|"Category" -> "Anaerobic"|>}]]Generalizations & Extensions (1)
Customize the assessment with larger menus and fonts, along with dark mode colors:
QuestionObject[QuestionInterface["SelectPair", <|"Prompt" -> Style["Match your favorite character with their partner", Bold, 18, LightDarkSwitched@Blue], ImageMargins -> 10, FrameMargins -> 5, DefaultMenuStyle -> Directive[Bold, 16, LightDarkSwitched@Purple]|>], AssessmentFunction[{"Batman" -> <|"Category" -> "Robin"|>, "Tom" -> <|"Category" -> "Jerry"|>, "Mickey" -> <|"Category" -> "Donald"|>}]]See Also
QuestionInterface QuestionObject
Question Interface Types: MultipleChoiceGrid MultipleChoice