Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities > Styles > Categorical response lists > Colors for categorical response lists
 
Colors for categorical response lists
You can specify the foreground and backgrounds color for a complete categorical response block. The foreground color is applied to the response texts and the background color is applied to the whole area covered by the response block.
In the metadata section
Put the following element after the question text:
style([color = "<text_color>"][, bgcolor = "<block_background_color>"])
where:
<text_color> is the color for the response texts.
<block_background_color> is the background color for the response block.
For example:
Sports9 "Which of the following sports do you play?"
style(color = "blue", bgcolor = "yellow") categorical [1..]
{Tennis, Football, Cricket, Basketball, Hockey};
produces:
This graphic is described in the surrounding text.
Compare this with the colors examples in Colors that use labelstyle instead of style: the yellow background now applies to the whole of the response list not just to the text.
You cannot change the color of check boxes or radio buttons.
In the routing section
Type:
<question_name>.Style.Color = "color"<question_name>.Style.BgColor = "color"
The following statements produce the same output:
Sports.Style.Color = "blue"
Sports.Style.BgColor = "yellow"
See also
Categorical response lists