[Bf-python] Slider Button API

Dave Jarvis thangalin at gmail.com
Wed Apr 11 22:48:45 CEST 2007


Hi,

After I have created a Slider Button using:

    slider = Draw.Slider( ... )

How do I then change the minimum and maximum values for the slider?

I thought I could do the following (initial, min, max):

    slider.val = (1.0, 0.0, 100.0)

Or even:

    slider.min = 0.0
    slider.max = 100.0
    slider.val = 1.0

If I have to recreate a Slider, I will ... but then, how do I remove
the old one?

For the curious, I am creating a .wav-to-IPO interface. When the user
opens a new sound file, the power levels for that file will be
different. Consequently, I want to prohibit the user from selecting a
level of power that goes beyond or below the limits available in the
file.

Yes, I could simply readjust the value after they have selected it,
but then I have to have an "ultimate" maximum value. At which point,
if the file only contains values from 10 to 100, having a slider that
targets 0 to 30000 seems kind of silly.

Here's a picture to help get the idea across:

http://davidjarvis.ca/blender/images/aau-02.png

Thanks!
Dave



More information about the Bf-python mailing list