UpDown_SetAccell

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > UpDown Control > UpDown Control Commands >

UpDown_SetAccell

 

Description

 

Sets the acceleration for an UpDown control.

 

Syntax

 

UpDown_SetAccell(hWnd, ctrlID, nAccels, PtrToFirstAccell)

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle of the dialog containing the control

ctrlID

Number

No

Control identifier assigned to the control during CONTROL ADD ...

nAccels

Number

No

Number of UDACCEL accelerator structures passed by the pointer

PtrToFirstAccell

Number

No

Pointer to an UDACCEL accelerator structure or to the first element of an array of UDACCEL strucures.

 

Remarks

 

Restrictions

 

In case array of UDACCEL strucures, elements should be sorted in ascending order based on the nSec member.

 

See also

 

Examples

 

Dim uda() As UDACCEL

 

'---Set the increment at different time. Attention to set them in ascending order in the array

ReDim uda(4)

uda(1).nSec = 1   : uda(1).nInc = 5     '---First increment will last for the first 5 secs

uda(2).nSec = 5   : uda(2).nInc = 50    '---After 5 secs the increment will be by 50

uda(3).nSec = 10  : uda(3).nInc = 500   '---After 10 secs increment will be by 500

uda(4).nSec = 15  : uda(4).nInc = 1000  '---And last, after 15 secs we will increment by 1000

 

'---Now set it indicating how many and a pointer to the first element

UPDOWN_SetAccell CBHNDL%ID_UPDOWN, 4, VARPTR(uda(1))