"Lorri Sloane" <[EMAIL PROTECTED]> wrote:
> > > I can't seem to get them [repeating buttons]
> > > to work. Everytime I click on the repeat button (or hold it down), it
> >does
> > > increment the field then it immediately returns to my default field
> >value.
> >
> >Return false from your event handler.
>
> It appears as if I was already returning a false from the event handler.
> Does anybody have a snippet of sample code to show me WHERE I should locate
> the code to handle an incremental repeating button?
Here's the code:
case ctlRepeatEvent:
delta = 0;
switch (event->data.ctlRepeat.controlID)
{
case BIDtempup:
delta = 5;
break;
case BIDtempdn:
delta = -5;
break;
}
if (delta)
{
BumpTemp(prefs, delta);
UpdateTempField(FrmGetActiveForm(), prefs->caltemp, 1);
}
break;
Here's the corresponding part of the .rcp file (two lines, beware of
word wrap in this mailer):
REPEATBUTTON "\001" ID BIDtempup AT (62 PREVBOTTOM+2 15 AUTO)
NOFRAME FONT 5
REPEATBUTTON "\002" ID BIDtempdn AT (PREVRIGHT+2 PREVTOP 15 AUTO)
NOFRAME FONT 5
Hope this helps!
--
Roger Chaplin
<[EMAIL PROTECTED]>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html