From: Geoff Chambers on
I was tring to force my spinner to increment and decrement by 10, but
the following didn't work, any ideas?

METHOD VerticalSpin(oSpinEvent) CLASS EditCostEventDLG

SUPER:VerticalSpin(oSpinEvent)
//Put your changes here

DO CASE
CASE oSpinEvent:Type = UNITINCREMENT
SELF:oDCAppPercent:Value += 10
CASE oSpinEvent:Type = UNITDECREMENT
SELF:oDCAppPercent:Value -= 10
CASE oSpinEvent:Type = SCROLLTOBOTTOMRIGHT
CASE oSpinEvent:Type = SCROLLEND
ENDCASE


RETURN NIL

From: Amilcar A. Camargo on
Hi Geoff,

On Thu, 1 Jul 2010 13:13:07 -0700 (PDT), Geoff Chambers <gchambers02(a)msn.com>
wrote:

>I was tring to force my spinner to increment and decrement by 10, but
>the following didn't work, any ideas?

Try the following code in your window PosInit:

[code]
LOCAL pUDAccel AS _winUDACCEL

pUDAccel := MemAlloc( _sizeof( _winUDACCEL ) )
IF pUDAccel <> NULL_PTR
pUDAccel.nSec := 0
pUDAccel.nInd := 10
SendMessage( SELF:oDCAppPercent:Handle(), ;
UDM_SETACCEL, ;
1u, ;
LONG(_CAST, pUDAccel ) )
MemFree( pUDAccel )
ENDIF
[end code]

HTH,
Amilcar A. Camargo F.
Guatemala, C. A.
http://acf1996.webatu.com/cavo
From: Geoff Chambers on
On Jul 1, 7:44 pm, Amilcar A. Camargo <amilcarcama...(a)gmail.com>
wrote:
> Hi Geoff,
>
> On Thu, 1 Jul 2010 13:13:07 -0700 (PDT), Geoff Chambers <gchamber...(a)msn.com>
> wrote:
>
> >I was tring to force my spinner to increment and decrement by 10, but
> >the following didn't work, any ideas?
>
> Try the following code in your window PosInit:
>
> [code]
>         LOCAL pUDAccel          AS _winUDACCEL
>
>         pUDAccel := MemAlloc( _sizeof( _winUDACCEL ) )
>         IF pUDAccel <> NULL_PTR
>                 pUDAccel.nSec := 0
>                 pUDAccel.nInd := 10
>                 SendMessage( SELF:oDCAppPercent:Handle(), ;
>                                                 UDM_SETACCEL, ;
>                                                 1u, ;
>                                                 LONG(_CAST, pUDAccel ) )
>                 MemFree( pUDAccel )
>         ENDIF
> [end code]
>
> HTH,
> Amilcar A. Camargo F.
> Guatemala, C. A.http://acf1996.webatu.com/cavo

The PostInit code worked perfect (nInd should be nInc).