# Dynamically set min and max for slider bar in ParaView filter

**URL:** https://discourse.paraview.org/t/dynamically-set-min-and-max-for-slider-bar-in-paraview-filter/9581
**Category:** Development
**Tags:** vtk
**Created:** [May 6, 2022, 7:52pm UTC](https://discourse.paraview.org/t/dynamically-set-min-and-max-for-slider-bar-in-paraview-filter/9581 "2022-05-06T19:52:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RHMoore](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/898d66/32.png) [@RHMoore](https://discourse.paraview.org/u/RHMoore)
#### Post date: [May 6, 2022, 7:52pm UTC](https://discourse.paraview.org/t/dynamically-set-min-and-max-for-slider-bar-in-paraview-filter/9581/1 "2022-05-06T19:52:17Z")

</div>

I would like to set the minimum and maximum slider bar limits dynamically using C++ inside ParaView’s filter GUI. I have a ParaView build of 5.10.0 on Windows. The limits are read in from a file, so I don’t have something like a scalar data array in general.

I have tried many things and have searched, but I am still stuck. Below is a small XML sample. How can I set the min and max range to be different than 1 and 11 from inside C++?

```auto
<IntVectorProperty name="RangeMaxInfo" information_only="1">
          <ArraySelectionInformationHelper attribute_name="RangeMax"/> 
</IntVectorProperty>

<IntVectorProperty command="SetLastFrameNum"
                            default_values="1"
                            name="LastFrameNum"
                            number_of_elements="1">
        <IntRangeDomain name="range" min="1" max="11" >
          <RequiredProperties>
            <Property name="RangeMaxInfo" function="RangeMax" />
          </RequiredProperties>
        </IntRangeDomain>
        
        <Documentation>
           Set LastFrameNum.
        </Documentation>
</IntVectorProperty>

```

Thank you.

- Rob
