Slider Help

Archives Forums/BlitzPlus Programming/Slider Help

rdodson41(Posted 2003) [#1]
I've made a slider for a gui i've designed, I have the shape, value,range and everything. But how do I make it move the canvas that I want it to scroll? Any help would be appreciated.

-Rich05


soja(Posted 2003) [#2]
I'm not quite sure what you mean by scrolling a canvas, or how that happens, but if you can figure out that part, here's how you would make it work with the scroll bar.

You would have to tie a scroll event with your scroll canvas update. In your Event loop, check for event $401 (GadgetAction). When that is detected, if the EventSource is your slider gadget, then that means it has been "scrolled". Check the SliderValue to get the new value of the slider, and then call your "canvas scroll" function with that parameter.

Does that help at all?


rdodson41(Posted 2003) [#3]
I got all the event stuff, but I can't figure out how to get the canvas to scroll is there really a canvas scroll function? Iv'e never heard of one. Have I just missed it in the Command Reference?

-Rich05


rdodson41(Posted 2003) [#4]
Nevermind soja. I figured it out. Thx for the help!

-Rich05