|
key
|
|
Full name
|
pfc_u_calendar.dw_cal.key
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event key(keycode,unsignedlong)
|
event key;call super::key;//////////////////////////////////////////////////////////////////////////////
//
// Event: key
//
// (Arguments:
// key
// keyflags
//
// (Returns: None)
//
// Description:
// Support keyboard to be used to change the date on the calendar.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Choose Case key
Case KeyEscape!
//If appropriate, hide the Calendar.
If IsValid(inv_dropdown) Then
If ib_closeonclick or ib_closeondclick Then
// Set focus on the Requestor object which in turns hides the calendar.
of_SetFocusOnRequestor()
End If
End If
Case KeyTab!
If IsValid(inv_dropdown) Then
Post of_SetFocusOnRequestor()
End If
Case KeyEnter!
If Not inv_datetime.of_IsValid(id_resetdate) Then
of_SetDate(id_date, True)
End If
//If appropriate, hide the Calendar.
If IsValid(inv_dropdown) Then
If ib_closeonclick or ib_closeondclick Then
// Set focus on the Requestor object which in turns hides the calendar.
of_SetFocusOnRequestor()
End If
End If
Case KeyLeftArrow!
this.Event pfc_PrevDay()
Case KeyUpArrow!
this.Event pfc_PrevWeek()
Case KeyPageUp!
this.Event pfc_PrevMonth()
Case KeyRightArrow!
this.Event pfc_NextDay()
Case KeyDownArrow!
this.Event pfc_NextWeek()
Case KeyPageDown!
this.Event pfc_NextMonth()
End Choose
end event