Scrolling in the Day and Week View of 4D Agenda
To setup scrolling in 4D Agenda, begin by creating two invisible buttons on the 4D Form.
Assign the “Up-Arrow key” to one button and the “Down-Arrow key” to the other one.
The method for the “Up-Arrow” button
C_INTEGER ($Err)
viStart:=vStart-1
viEnd:=vEnd-1
If (viStart<0)
viStart:=viStart+1
viEnd:=viEnd+1
End if
$Err:=AG SET AGENDA START HOUR (vAgenda;viStart)
TOOL_CheckError (err)
`Set the end hour of the agenda display
$Err:=AG SET AGENDA END HOUR (vAgenda;viEnd)
TOOL_CheckError (err)
$Err:=AG REDRAW (vAgenda;AG_DoNotReload )
The method for the “Down-Arrow” button
C_INTEGER ($Err)
viStart:=viStart+1
viEnd:=viEnd+1
If (viStart>23)
viStart:=viStart-1
viEnd:=viEnd-1
End if
$Err:=AG SET AGENDA START HOUR (vAgenda;viStart)
TOOL_CheckError (err)
`Set the end hour of the agenda display
$Err:=AG SET AGENDA END HOUR (vAgenda;viEnd)
TOOL_CheckError (err)
$Err:=AG REDRAW (vAgenda;AG_DoNotReload )
|