Okay, so how do I make sliders "slidy"? See the example below. I want it to be the case that when I drag the slider, the panel moves with it. At present, it just moves once I release the mouse button.
I *know* this is possible, because skid did it in his maxedit code editor. But despite rummaging in that code, I can't see how! Any ideas? Anyone? Am I being really stupid?
I *know* this is possible, because skid did it in his maxedit code editor. But despite rummaging in that code, I can't see how! Any ideas? Anyone? Am I being really stupid?
SuperStrict Local win:TGadget = CreateWindow("test" , 0 , 0 , 200 , 200 , Null , WINDOW_TITLEBAR) Local tab:TGadget = CreateTabber(0 , 0 , 150 , 150 , win) Local panel:TGadget = CreatePanel(0 , 0 , 130 , 500 , tab) Local slider_v:TGadget = CreateSlider(ClientWidth(tab) - 20 , 0 , 20 , ClientHeight(tab) , tab) SetSliderRange slider_v , ClientHeight(tab) , 500 For Local i:Int = 0 To 20 CreateButton "test " + i , 10 , 10 + i * 20 , 110 , 15 , panel Next Local t:TTimer = CreateTimer(60) Repeat WaitEvent() Select EventSource() Case win If EventID() = EVENT_WINDOWCLOSE Then End Case slider_v If EventID() = EVENT_GADGETACTION Then SetGadgetShape panel,0,-EventData(),GadgetWidth(panel),GadgetHeight(panel) EndIf Case t SetGadgetShape panel,0,-SliderValue(slider_v),GadgetWidth(panel),GadgetHeight(panel) End Select Forever