SftTree/OCX 7.0

SftTree.KeyDown Event

Softel vdm, Inc.

A key is pressed.

Syntax       

VB.NET

Private Sub object_KeyDownEvent(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.KeyDownEvent

VB

Private Sub object_KeyDown(KeyCode As Integer, ByVal Shift As Integer)

C#.NET

void object_KeyDownEvent(object sender, EventArgumentType e);

VC++

void OnKeyDownobject(short* KeyCode, short Shift);

C

HRESULT OnKeyDownobject(short* KeyCode, short Shift);

Delphi

procedure objectKeyDown(Sender: TObject; var KeyCode : Smallint; Shift : Smallint);

object

A SftTree object.

KeyCode

The virtual key pressed.  See your development environment documentation for available key code constants.

Shift

The state of the SHIFT, CONTROL and ALT keys during the event (see SftTreeKeyConstants).  A bit is set if the key is down.  The Shift argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys.  The Shift variable indicates the state of these keys.  Some, all, or none of the bits can be set, indicating which of the keys are pressed.

Shift

Value

Description

constSftTreeShiftMask 

1

The SHIFT key was pressed.

constSftTreeCtrlMask

2

The CONTROL key was pressed.

constSftTreeAltMask

4

The ALT key was pressed.

Comments

The KeyDown event occurs when a key is pressed.

The KeyDown event is generated when the user presses a key while the tree control has the input focus.  The KeyDown event is not generated during cell editing.

If the tree control is part of a parent window (form, dialog, etc.) which has a default button (OK, Cancel) and the user presses the ENTER or ESCAPE keys, this event is not generated.

The KeyDown event is never generated for the TAB key.

To interpret keyboard characters (ANSI characters) use the KeyPress event.

The key typed by the user can be suppressed by setting KeyCode to 0. It can be modified by assigning a new value to the variable.

See Also  SftTree Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com