| **Navigation:**  [[introduction.htm|Language Reference]] > 9 -  Window and Report Attributes > Window and Report Attributes >====== DELAY (set repeat button delay) ====== | [[default set enter key button .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[disable set control dimmed at open .htm|{{btn_next_n.gif|Next page}}]] | | || {{newc7.jpg|NewC7.jpg}} **DELAY( **//time//** )** {{blk2blue.jpg|blk2blue.jpg}} | **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:** [[imm set immediate event notification .htm|IMM]] [[repeat set repeat button rate .htm|REPEAT]]