You can change the value of almost any attribute of a CSS widget. There are predefined attributes listed in the Rules property that can change the behavior of a widget based on the value
of a PV. The screen shot below shows how to define a foreground color rule based off a PV to be green when value is 1, else turn red.
There appears to be no easy way to set the Off/On Label properties from the DB records ZNAM/ONAM fields. In (edm), there is a Label property that allows one to set the label value to (PV
State or Literal). I made a request on github for this option in BOY. https://github.com/ControlSystemStudio/cs-studio/issues/2189
<email@example.com> on behalf of Miguel <firstname.lastname@example.org>
Date: Thursday, April 20, 2017 at 10:44 AM
To: "email@example.com" <firstname.lastname@example.org>
Subject: Re: Fwd: CSS binary color text
I also need to click over it to change the state.
The only way i have so far is in fact to use the Image boolean button. I set the one severity field (OSV) to major .Then set in CSS the foreground to green and checked the ForeColor Alarm Sensitive to yes.
But I am still not able to automatically use the ONAME and ZNAME fields in CSS so I have to manually set the ON and OFF label.
On 18-04-2017 11:35, Luca Cavalli wrote:
if you need to display only a text label you can use a Text Update widget with the transparent flag set, plus (as already suggested) a rule to change foreground color upon PV value.
On Fri, 2017-04-14 at 19:15 +0100, Miguel wrote:
I would like to do two things with my bo records in CSS.
1. Have a text that is according to the ONAM and ZNAM pv fields.
2. That this text is green in case of on and red othwerwise
I only manage to do something similiat with an image boolean button
(with no image and ON OFF predefined text)
<< Le informazioni contenute in questo messaggio di posta elettronica e relativi allegati sono riservate e confidenziali e ne è vietata la diffusione in qualunque modo eseguita. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo
ad eliminarlo e a darcene gentile comunicazione. Quanto precede ai fini del rispetto delle Legge 675/96 e del Decreto Legislativo 30/06/2003 n.196, sulla tutela dei dati personali >>
<< This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete
this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person: to do so could be a breach of confidence. Thank you for your co-operation. Please contact our IT Helpdesk on +3902380481 or email
email@example.com if you need assistance >>