Changing a parameter on a view through a project script

I am trying to change the value of a parameter (false/true) from a project script. Lets say I have a View called View. That view has a parameter on the view called Visibility. I have a button which runs a script on that view. I want the script to change the value of the parameter on the view. I have tried to create this and no matter what I try I am unable to get the value to change on the view itself. Can an example of how to do this be supplied? Thanks.

I think you have to do this using messages:

onActionPerformed script of a Button which is a child component of “View”:

self.view.params.Visibility = False

To add to Cody’s answer, you can use this button to ‘pick’ a component property from a list to make this easier: