SftTree/OCX 7.0

SftTree.CellEditIntercept Method

Softel vdm, Inc.

Defines keystrokes to be intercepted during cell editing (using the EditNavigating event).

Syntax       

VB.NET

object.CellEditIntercept(ByVal Key As Integer, ByVal Style As SftTreeCellEditInterceptStyleConstants)

VB

object.CellEditIntercept(ByVal Key As Long, ByVal Style As SftTreeCellEditInterceptStyleConstants)

C#.NET

void object.CellEditIntercept(int Key, SftTreeCellEditInterceptStyleConstants Style);

VC++

HRESULT object->CellEditIntercept(long Key, enum SftTreeCellEditInterceptStyleConstants Style);

C

HRESULT object->raw_CellEditIntercept(long Key, enum SftTreeCellEditInterceptStyleConstants Style);

Delphi

procedure object.CellEditIntercept(Key : Integer, Style : TOleEnum);

object

A SftTree object.

Key

A virtual key code.  Defines the key to be intercepted during cell editing.

Symbol Name

Value

Description

VK_LBUTTON

0x01

Touch screen  

VK_CANCEL

0x03

Control-break processing

VK_BACK

0x08

BACKSPACE key

VK_TAB

0x09

TAB key

VK_CLEAR

0x0c

CLEAR key

VK_RETURN

0x0d

ENTER key

VK_SHIFT

0x10

SHIFT key

VK_CONTROL

0x11

CTRL key

VK_MENU

0x12

ALT key

VK_CAPITAL

0x14

CAPS LOCK key

VK_ESCAPE

0x1B

ESC key

VK_SPACE

0x20

SPACEBAR key

VK_PRIOR

0x21

PAGE UP key

VK_NEXT

0x22

PAGE DOWN key

VK_END

0x23

END key

VK_HOME

0x24

HOME key

VK_LEFT

0x25

LEFT ARROW key

VK_UP

0x26

UP ARROW key

VK_RIGHT

0x27

RIGHT ARROW key

VK_DOWN

0x28

DOWN ARROW key

VK_SELECT

0x29

SELECT key

VK_EXECUTE

0x2B

EXECUTE key

VK_SNAPSHOT

0x2C

PRINT SCREEN key for Windows 3.0 and later

VK_HELP

0x2F

HELP key

VK_0

0x30

0 key

VK_1

0x31 

1 key

VK_2

0x32

2 key

VK_3

0x33

3 key

VK_4

0x34

4 key

VK_5

0x35

5 key

VK_6

0x36

6 key

VK_7

0x37

7 key

VK_8

0x38

8 key

VK_9

0x39

9 key

VK_A

0x41

A key

VK_B

0x42

B key

VK_C

0x43

C key

VK_D

0x44

D key

VK_E

0x45

E key

VK_F

0x46

F key

VK_G

0x47

G key

VK_H

0x48

H key

VK_I

0x49

I key

VK_J

0x4A

J key

VK_K

0x4B

K key

VK_L

0x4C

L key

VK_M

0x4D

M key

VK_N

0x4E

N key

VK_O

0x4F

O key

VK_P

0x50

P key

VK_Q

0x51

Q key

VK_R

0x52

R key

VK_S

0x53

S key

VK_T

0x54

T key

VK_U

0x55

U key

VK_V

0x56

V key

VK_W

0x57

W key

VK_X

0x58

X key

VK_Y

0x59

Y key

VK_Z

0x5A

Z key

VK_NUMPAD0

0x60

Numeric keypad 0 key

VK_NUMPAD1

0x61

Numeric keypad 1 key

VK_NUMPAD2

0x62

Numeric keypad 2 key

VK_NUMPAD3

0x63

Numeric keypad 3 key

VK_NUMPAD4

0x64

Numeric keypad 4 key

VK_NUMPAD5

0x65

Numeric keypad 5 key

VK_NUMPAD6

0x66

Numeric keypad 6 key

VK_NUMPAD7

0x67

Numeric keypad 7 key

VK_NUMPAD8

0x68

Numeric keypad 8 key

VK_NUMPAD9

0x69

Numeric keypad 9 key

VK_MULTIPLY

0x6A

Asterisk (*) key

VK_ADD

0x6B

Plus sign (+) key

VK_SEPARATOR

0x6C

Separator key

VK_SUBTRACT

0x6D

Minus sign (–) key

VK_DECIMAL

0x6E

Period (.) key

VK_DIVIDE

0x6F

Slash mark (/) key

VK_ATTN

0xF6

 

VK_CRSEL

0xF7

 

VK_EXSEL

0xF8

 

VK_EREOF

0xF9

 

VK_PLAY

0xFA

 

VK_ZOOM

0xFB

 

VK_NONAME

0xFC

 

VK_PA1

0xFD

 

VK_OEM_CLEAR

0xFE

 

VK_LWIN

0x5B

 

VK_RWIN

0x5C

 

VK_APPS

0x5D

 

VK_LSHIFT

0xA0

 

VK_RSHIFT

0xA1

 

VK_LCONTROL

0xA2

 

VK_RCONTROL

0xA3

 

VK_LMENU

0xA4

 

VK_RMENU

0xA5

 

Note: Symbolic names are only available to applications written in C/C++, which use the #include directive to include WinUser.h, part of the Windows header files.

Style

Defines the processing options for the specified key.  One or more values of the following table can be combined.  Specify 0 to clear a key's processing options so it is no longer intercepted.

Name

Value

Description

cellEditInterceptSftTreeChar

1

Character Only - If the key is pressed without the CONTROL or SHIFT key, the EditNavigating event occurs.

cellEditInterceptSftTreeControlChar

4

CONTROL + Character - If the key is pressed with the CONTROL key, the EditNavigating event occurs.

cellEditInterceptSftTreeShiftChar

8

SHIFT + Character - If the key is pressed with the SHIFT key, the EditNavigating event occurs.

Comments

The CellEditIntercept method defines keystrokes to be intercepted during cell editing (using the EditNavigating event).

A key that is intercepted will generate the EditNavigating event so the application can handle the key.  Even keys such as RETURN and TAB, that are normally handled by enclosing forms, can be intercepted.

Only navigation keys should be intercepted.  Other keys can be handled in the control's own event handlers (KeyDown/KeyPress/KeyUp events).

Any key that is intercepted will no longer generate KeyDown, KeyPress and KeyUp events for the control used for cell editing and must be completely handled by the EditNavigating event.

The CellEditIntercept method is normally used in the EditInitializing event to define cell navigation keys for the cell about to be edited.

The defined intercepted keys are cleared once cell editing for a cell ends (the EditEnding event occurs).

See Also  SftTree Object | Object Hierarchy


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