Hi all,
I want to use the "New text" function to make the value of a power counter visible. What do I have to fill in the field "Pattern"? What are the allowed values of the fields "Style" and "Format"?
Best regards,
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Style field can contain everything that is allowed in the style attribute of a <td> html tag.
All the possible values are described in the CSS documentation.
Format field contains the text to display. If the "Insert value" checkbox is checked, you can put a "$1" (without quotes) where the object value has to be inserted.
If pattern field is empty, the object value is inserted as it is. If you need more advanced formatting, you can use the pattern field to specify a pattern to match. Each of the parenthesis groups in the pattern will correspond to $1, $2, $3, ... in the format field.
For example, the date in format YYYY-MM-DD can be transformed in DD/MM/YYYY using pattern "(\d+)-(\d+)-(\d+)" and format "Date: $3/$2/$1". For the complete list of possibilities offered by patterns, see: http://www.w3schools.com/jsref/jsref_obj_regexp.asp
Regards,
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I want to use the "New text" function to make the value of a power counter visible. What do I have to fill in the field "Pattern"? What are the allowed values of the fields "Style" and "Format"?
Best regards,
Chris
Hi,
Style field can contain everything that is allowed in the style attribute of a <td> html tag.
All the possible values are described in the CSS documentation.
Format field contains the text to display. If the "Insert value" checkbox is checked, you can put a "$1" (without quotes) where the object value has to be inserted.
If pattern field is empty, the object value is inserted as it is. If you need more advanced formatting, you can use the pattern field to specify a pattern to match. Each of the parenthesis groups in the pattern will correspond to $1, $2, $3, ... in the format field.
For example, the date in format YYYY-MM-DD can be transformed in DD/MM/YYYY using pattern "(\d+)-(\d+)-(\d+)" and format "Date: $3/$2/$1". For the complete list of possibilities offered by patterns, see:
http://www.w3schools.com/jsref/jsref_obj_regexp.asp
Regards,
Jean-François