Live scrolling?
BlitzMax Forums/MaxGUI Module/Live scrolling?
| ||
Is it possible to get a slider to emit update events on the fly as it changes rather than just when the user releases the slider control? |
| ||
ah you need to use an event hook and all will be good:D there are a few posts that explain better than i could. |
| ||
Aah, didn't know the hook system fired differently than the que, good to know. I can't find an example of how I would just hook the action event, do I need to hook EmitEventHook and parse every event with that? What I would really like is to use the que for all events other than that slider updates... |
| ||
pretty much, apparently then you drag a slider or do similar it enters a "modal" loop anyhow it works :D so just change it so your usual waitevent stuff is in the hook function.'eventHook Function eventHook:Object(id:Int, data:Object, context:Object) Local event:TEvent = TEvent(data) If Not event Return data Select event.source Case vCanvasSlider[0] vCanvasOffset[1] = SliderValue(vCanvasSlider[0]) Case vCanvasSlider[1] vCanvasOffset[0] = SliderValue(vCanvasSlider[1]) end select return data end function event.id includes things such as EVENT_WINDOWCLOSE |
| ||
Thanks, got it working, the trick is the return data at the end, anything you don't hook just gets left in the que with that. return null if you want the event to die after the hook does it's thing. |