In this article
Selectors can be used to set values for various properties in widgets, such as colours and text values, except for the formatter value.
Example of setting values with selectors in a headline widget View CDL widget headline #headlineWidget { label: "Setting values with Selectors" select #headlineIcon { label: "Icon" options: item { label: 'Beer' value: iconL18 }, item { label: 'Toaster' value: iconD69}, item { label: 'Jazz Musician' value: iconF81 } } select #headlineColour { label: "Colour" options: item { label: 'Pink' value: "#f5dbdb" }, item { label: 'Blue' value: #b0f1f2 } } tile infographic #infographicTile { value: 19.4 view: "iconView_infographicTile" colorFormatter: copy_of_dropOffDefaultFormatter } view icon #iconView_infographicTile { columns: 5 rows: 5 fillDirection: "horizontal" max: 25 precision: "exact" icon: @headlineIcon.selected } view numeric #numericView_infographicTile { max: 100 } size: small cardBackground: @headlineColour.selected } | Property ValuesThe majority of properties, not just data values, can be set with a selector such as colours, any text value, etc. one notable exception right now is the formatter value which does not accept references. View CDL select #headlineColour { label: ʺColourʺ options: item { label: 'Pink' value: "#f5dbdb" }, item { label: 'Blue' value: #b0f1f2 } } |