Navigation: Language Reference > 9 - Window and Report Attributes > Window and Report Attributes >====== DELAY (set repeat button delay) ====== | |
DELAY( time )
DELAY | Specifies the delay between first and second event generation. |
time | An integer constant containing the time delay to set, in hundredths of a second. |
The DELAY attribute (PROP:DELAY) specifies the delay between first and second event generation for automatically repeating buttons. For a BUTTON control with the IMM attribute, this is the time between the first and second EVENT:Accepted. For a SPIN control, this is the time between the first and second EVENT:NewSelection generated by the spin buttons.
The purpose of the DELAY attribute is to change the delay time from its default value so that users do not inadvertantly begin repeating the action when that is not their intention. Assigning a zero to PROP:DELAY resets the default setting, any other value sets the repeat delay for the control.
Example:
MDIChild WINDOW('Child One'),AT(0,0,320,200),MDI,MAX,HVSCROLL
BUTTON('Press Me'),AT(10,10,40,20),USE(?PressMe),IMM,DELAY(100) !1 second
SPIN(@n3),AT(60,10,40,10),USE(SpinVar),RANGE(0,999),DELAY(100) !1 second
END
CODE
OPEN(MDIChild)
?PressMe{PROP:Delay} = 50 !Reset delay to 1/2 second
?SpinVar{PROP:Delay} = 50 !Reset delay to 1/2 second
?PressMe{PROP:Repeat} = 5 !Set repeat to 5 hundredths of a second
?SpinVar{PROP:Repeat} = 5 !Set repeat to 5 hundredths of a second
See Also: