...
To achieve that, we use the Unicode symbol FISHEYE and the Pricefx feature "api.attributedResult(...).withTextColor(...)
" to return the symbol in color:
Green circle
paste-code-macro | ||||
---|---|---|---|---|
| ||||
def circle = "\u25C9" return api.attributedResult(circle).withTextColor("green") |
or
Red circle
paste-code-macro | ||||
---|---|---|---|---|
| ||||
def circle = "\u25C9" return api.attributedResult(circle).withTextColor("red") |
...
Useful links to find the right symbol:
Unicode in Groovy
The "escape syntax" for Unicode characters can be used when you need to use "special" Unicode characters in the Groovy source code (note that the same applies to Java).
The escape syntax is as follows:
...
\u<hexacode>
...
or
...
\U<hexacode>
...
So for example, when you need to show the below circle, you can use the Unicode symbol FISHEYE that has code "\u25C9", as you can see in the example below:
...
Output
And this is the output, the way the symbol is displayed in Pricefx.
In the "classic" UI, in Table View:
...
In Unity UI - Table View:
...
In Unity UI - Tree View:
...