Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 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
<== Date ==> <== Thread ==>

Subject: Re: Table properties in CSS BOY
From: "Kasemir, Kay" <kasemirk@ornl.gov>
To: Shantonu Sahoo <ssahoo@vecc.gov.in>, EPICS Tech-Talk <tech-talk@aps.anl.gov>
Date: Fri, 20 Jan 2017 13:51:57 +0000
Hi:

>.. I am using a table widget for displaying some pv values. From an example (DisplayPVValuesinTable.pl) I could infer that setCellText() function  is used to set the value for a particular cell in table. If, I want to do the reverse, ie read the value of a particular cell what is the function to be used. I tried with getCellText() would be it, but it didn't work. Also, where to find other related functions.  Is there any documentation for it?

Yes, there is documentation in the online help.

Try the menu Help, Help Contents.
Select the help page CSS Applications, Display, BOY, Widgets, Table:

"Special Methods
public SpreadSheetTable getTable()
Get the native spread sheet table wrapped by this widget. Script has full access to the returned SpreadSheetTable at run time."

Follow the link to the detail of the "SpreadSheetTable" class:

String getCellText(int row, int col)
String[][] getContent()

Here's an example script that can for example be attached to a Label widget with some bogus trigger PV like "sim://sine" to run periodically:

----------------------------
from org.csstudio.opibuilder.scriptUtil import PVUtil

# This script's "widget' is the Label widget.
# Fetch the table widget to read via its name:
tab_widget = display.getWidget("NameOfMyTable")
# Get the underlying SpreadSheetTable
table = tab_widget.getTable()
# Read the online help, see how getCellText() works
cell_text = table.getCellText(1, 1)

# Update the Label widget's 'text' property
widget.setPropertyValue("text", cell_text)
------------------------------------

Thanks,
Kay


References:
Table properties in CSS BOY Shantonu Sahoo

Navigate by Date:
Prev: Table properties in CSS BOY Shantonu Sahoo
Next: Emulating the use of Global VxWorks Variables in OSI Matt Rippa
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
Navigate by Thread:
Prev: Table properties in CSS BOY Shantonu Sahoo
Next: Emulating the use of Global VxWorks Variables in OSI Matt Rippa
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
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·