Jump to content
  • How to toggle the Data Panel on/off using an IronPython script in Spotfire®.


    This article illustrates how to show and hide the Data Panel using an IronPython script.

    Introduction

    This example illustrates how to show and hide the Data Panel using an IronPython script.

    Panels must be docked when making them visible since setting this property to "true" will be ignored when the panel state is pop-over.

    Code sample

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    import Spotfire.Dxp.Application.PanelCollection
    import Spotfire.Dxp.Application.PanelTypeIdentifiers
    from Spotfire.Dxp.Application import Panel
    from Spotfire.Dxp.Application.Layout import PanelState as ps
    
    for panel in Document.ActivePageReference.Panels:
    	if (panel.TypeId.DisplayName == "Data"):
    		if (panel.Visible == True):
    			panel.Visible=False
    		elif (panel.Visible == False):
    			panel.PanelState = ps.Docked
    			panel.Visible= True
    
    #####################################################
    
    import Spotfire.Dxp.Application.PanelCollection
    from Spotfire.Dxp.Application import PanelTypeIdentifiers
    from Spotfire.Dxp.Application import Panel
    from Spotfire.Dxp.Application.Layout import PanelState as ps
    
    for panel in Document.ActivePageReference.Panels:
    	if (panel.TypeId == PanelTypeIdentifiers.DataPanel):
    		if (panel.Visible == True):
    			panel.Visible=False
    		elif (panel.Visible == False):
    			panel.PanelState = ps.Docked
    			panel.Visible= True
     

    References

    License:  TIBCO BSD-Style License

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...