Noob Warning: How to change default range on slider

Sorry all for the dumb newbie question (see excuses below)…

The subject line really says it all.

Simply: How do I change the default range for a slider?

Excuses: Old C programmer, managed to avoid OO til now, new to Panda3D, Python. Lotsa learning to do!!!

check out

They list range as the option to set when you declare the bar.




Here is my code:

self.sliderX = DirectSliderBar(pos = Vec3(0,0,0.7), value = .50,
range=(1,10), command = self.PanX)

I get the following error:

TypeError: bad argument type for built in operation.

I remove the range option and I do not get the error.

Any hints?

oops, the new panda uses a range tuple, but 1.0.5 has range as a multiplier on 0 to 1. So, range=10 will give you values from 0 to 10. From there, your slider callback can add an offset if you need it.