May 01, 2024, 04:51:58 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


set increment in spinner (Buddy) control

Started by dossic, September 17, 2008, 09:25:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dossic

I needed to change the increment in buddy (spinner) controls.  I wrote a short subroutine, it may be useful for some of us.
regards   Carlo

TYPE UDACCEL
   DEF nSec1 As INT
   DEF nInc1 As INT
ENDTYPE
DEF aAccels as POINTER

CONST WM_USER = 0x400
CONST UDM_SETACCEL =           (WM_USER+107)

sub SetSpinnerIncrement(parent:DIALOG,id:UINT,inc:INT)
   'set Increment as "inc" variable
   aAccels=NEW(UDACCEL,1)
   #<UDACCEL>aAccels.nSec1 = 300    'time in ms between autochange
   #<UDACCEL>aAccels.nInc1 = inc
   a = SENDMESSAGE parent,UDM_SETACCEL,1,aAccels,id
endsub