Create scrollbar to set parameters value

Hi,

I would like to create a scrollbar or similar to set a parameter value with the use of python code.
I have created some interactive buttons to get paths and volumes in my module but I don’t know how to reach this new issue.

Moreover, I would like to display changes in the scene as parameter changes value.

The idea is similar to opacity scrollbar.

Any help is kindly appreciated!

These tutorials should answer all your questions. If not, let us know:

https://www.slicer.org/wiki/Documentation/Nightly/Training#Slicer4_Programming_Tutorial