1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: CSS BOY enum local PV |
From: | "Kasemir, Kay" <[email protected]> |
To: | "Gregory, Ray" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Thu, 26 Apr 2018 18:12:04 +0000 |
Hi:
If you cannot use an actual enum PV because there are too many labels, and you can't use a local enum PV because that doesn't allow changes to the enum labels, then don't use an enum PV.
Instead, on the combo box, un-check the option to get "Items from PV" and directly enter the items, as many as you want. Or set the items from a script:
from org.csstudio.display.builder.runtime.script import ScriptUtil For more examples: Menu CS-Studio, Utilities, Install Samples, select the Display Builder examples, then check out Display Builder/controls_combo.bob
-Kay
From: [email protected] <[email protected]> on behalf of Gregory, Ray <[email protected]>
Sent: Thursday, April 26, 2018 1:58 PM To: [email protected] Subject: [UNTRUSTED] RE: CSS BOY enum local PV Thank you, Kay. Can you tell me how to modify the enum labels from a script after I have defined the local enum PV as you describe?
--Ray
From: Kasemir, Kay
> Is it possible to create a local enum PV in CSS that can be used as the PV for a Combo widget that also gets its items from the PV? Yes:
loc://demo<VEnum>(2, "A", "B", "C", "D")
You have to provide the data type <VEnum> to get an enum. The initializer needs to contain the initial index value, followed by the enum labels.
|