SDK Reference:

"The control routine CtlHandleEvent sends this event. When CtlHandleEvent
receives a ctlEnterEvent in a repeating button (tREP) or a feedback slider
control (tslf), it sends a ctlRepeatEvent. When CtlHandleEvent receives a
ctlRepeatEvent in a repeating button, it sends another ctlRepeatEvent if the
pen remains down within the bounds of the control for 1/2 second beyond the
last ctlRepeatEvent."

It then defines eventP->data.ctlRepeat.time as System-ticks count when the
event is [re] added to the queue.

Obviously the time is hard coded to be 1/2 second by the OS, by taking
SysTicksPerSecond/2, but this method does not work well on the Emulator.

Alan

When CtlHandleEvent receives a ctlRepeatEvent in a
feedback slider control, it sends a ctlRepeatEvent each time the
slider's thumb moves by at least one pixel. Feedback sliders do not
send ctlRepeatEvents at regular intervals like repeating buttons
do.
If you return true in response to a ctlRepeatEvent,


Alan

"Christian Eyrich" <[EMAIL PROTECTED]> wrote in message
news:93604@palm-dev-forum...
>
> Hi Alan,
> > Try:
> >
> >     eventP->data.ctlRepeat.time += SysTicksPerSecond() / 5;
> >
> > This adds .2 second delay between repeats.  Note that the fast repeating
you
> > are experiencing only happens in the emulator, not on a real device.
>
> Wow, that works - just great, thank you!
> I interpreted the reference as time is just a info and therefore a
> output var. But that's much better - sounds like this is official, does
> it work in all versions?
>
> Bye,
> Christian
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to