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 <2025> | 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 <2025> |
<== Date ==> | <== Thread ==> |
---|
Subject: | [CSS/Phoebus] Adding widgets as children to other widgets, from Python |
From: | "Gonzalez, Jose Carlos via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 11 Mar 2025 10:45:12 +0000 |
Hi,
I'm trying to use scripting to populate a CSStudio/Phoebus panel/display with a set of replica of a template panel, which shows information from a single monitored entity. In total, there would be N1 copies of that template in the panel (distributed in rows
and columns). I'm following pretty much the example provided in the template sample panel.
Now, in fact I don't have 1 single set of entities, but 3 of them. So, I have two possibilitites: a) I can create 3 similar panels, each of them showing one of these 3 sets, or b) I can (my preferred solution, if possible) I can create 1 single panel with a Tabs or Navigator Tabs widget, with 3 pages, and show in each of them one of those 3 sets.
My only question is: how can I, from a Python script, make that the new template panel that I'm replicating is a child of one of those pages (instead of being a child of the display/panel itself). In the later case, I use:
display = widget.getDisplayModel()
to get the display handler, and then
for i in range(...):
. . . instance = createInstance(...) display.runtimeChildren().addChild(instance) to add each single instance ans a child of the display.
How can I get the page handlers for the Tabs or Navigator Tabs widget, instead?
Thanks in advance,
J C -- Jose Carlos Gonzalez Max-Planck-Institut für Plasmaphysik Boltzmannstr. 2,
|