Table of Contents

CHAR event (Listbox)

Description

Fired when the user presses a key while the ListBox has focus.

Syntax

bForward = CHAR( CtrlEntID, 
                 CtrlClassID,
                 VirtCode,
                 ScanCode,
                 CtrlKey,
                 ShiftKey,
                 AltKey )

Parameters

NameDescription
CtrlEntIDFully qualified name of the ListBox receiving the event.
CtrlClassIDType of control receiving the event. In this case "LISTBOX".
VirtCodeCharacter that has been entered. This can be null if the keystroke generated a non-printable character such as an arrow key.
ScanCodeIf the keystroke generated a non-printable character this parameter contains the key-code.
CtrlKeySet to TRUE$ if the Ctrl key was pressed when the event was raised.
ShiftKeySet to TRUE$ if the Shift key was pressed when the event was raised.
AltKeySet to TRUE$ if the Alt-key was pressed when the event was raised.

Returns

TRUE$ or FALSE$. If FALSE$, the program execution returns to the calling procedure. If TRUE$, the event processing goes to the next level. There is no system level CHAR event processing for a LISTBOX control.

Remarks

This event is raised as a result of the Windows WM_KEYDOWN and WM_CHAR notifications.

Equated constants for key codes can be found in the MSWIN_VIRTUALKEY_EQUATES insert record.

See Also

LISTBOX ACCEPTENTER property, LISTBOX EDITKEY property, LISTBOX ENTERASDBLCLK property, Common GUI NOECHO property.