# Setting visible to false on a param object

**URL:** <https://discourse.holoviz.org/t/setting-visible-to-false-on-a-param-object/4114>\
**Category:** Panel\
**Created:** [August 16, 2022, 9:16am UTC](https://discourse.holoviz.org/t/setting-visible-to-false-on-a-param-object/4114 "2022-08-16T09:16:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axeldnahcram](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/axeldnahcram/32/2577_2.png) [@Axeldnahcram](https://discourse.holoviz.org/u/Axeldnahcram)\
**Post date:** [August 16, 2022, 9:16am UTC](https://discourse.holoviz.org/t/setting-visible-to-false-on-a-param-object/4114/1 "2022-08-16T09:16:39Z")

</div>

Hi,  
I want to disable a visual based on its param definition as is shown in the example below.

```auto
import panel as pn
import param
pn.extension("bokeh")
class SimpleExample(param.Parameterized):
    update_plot = param.Action(label="UPDATE PLOT", doc="Update the plot")
    
    def __init__ (self, **params):
        super(). __init__ (**params)
        self.update_plot = self._update_plot
        self.button = pn.Param(
                self.param.update_plot,
                widgets={"update_plot": {"button_type": "primary"}},
            )
        self.panels = [
            self.button]
        self.button.visible=False
        self.main = pn.Column(*self.panels)
        
    def _update_plot(self, *_):
        time.sleep(3)
app = SimpleExample(name="simple")
app.main.servable()

```

I think the code is working properly, but I cannot find the attribute that allows me to set visible to false since I am currently setting it to the param object.  
Any idea what I am doing wrong ?

---

<div class="post-metadata">

**Author:** ![Axeldnahcram](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/axeldnahcram/32/2577_2.png) [@Axeldnahcram](https://discourse.holoviz.org/u/Axeldnahcram)\
**Post date:** [August 16, 2022, 9:19am UTC](https://discourse.holoviz.org/t/setting-visible-to-false-on-a-param-object/4114/2 "2022-08-16T09:19:48Z")

</div>

Okay, a three second search in the discourse told me that I need to use layout, I am sorry 😑

---

<div class="post-metadata">

**Author:** ![Hoxbro](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/hoxbro/32/3590_2.png) [@Hoxbro](https://discourse.holoviz.org/u/Hoxbro)\
**Post date:** [August 16, 2022, 9:27am UTC](https://discourse.holoviz.org/t/setting-visible-to-false-on-a-param-object/4114/3 "2022-08-16T09:27:49Z")

</div>

Can you post the link to the other issue? Then people can avoid the three-second search if they hit the post first. 🙃

---

<div class="post-metadata">

**Author:** ![Axeldnahcram](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/axeldnahcram/32/2577_2.png) [@Axeldnahcram](https://discourse.holoviz.org/u/Axeldnahcram)\
**Post date:** [August 16, 2022, 9:34am UTC](https://discourse.holoviz.org/t/setting-visible-to-false-on-a-param-object/4114/4 "2022-08-16T09:34:58Z")

</div>

Sure. Here is one of the [original issue](https://discourse.holoviz.org/t/panel-param-change-in-visible-property-is-not-applied/2990)
