SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Positions cell editing on another cell.
VB.NET | Handled = object.EditNavigate(ByVal Key As Integer, ByVal Shift As Short) As Boolean |
VB | Handled = object.EditNavigate(ByVal Key As Long, ByVal Shift As Integer) As Boolean |
C#.NET | bool Handled = object.EditNavigate(int Key, short Shift); |
VC++ | VARIANT_BOOL Handled = object->EditNavigate(long Key, short Shift); |
C | HRESULT object->raw_EditNavigate(long Key, short Shift, VARIANT_BOOL* Handled); |
object
Key
A virtual key code. The key to be handled.
Symbol Name | Value | Description |
---|---|---|
VK_TAB | 0x09 | TAB key - This key is handled by the EditNavigate method. Editing of the current cell ends and the next or previous editable cell in the tree control is edited. The TAB key will position to the next cell, SHIFT + TAB to the previous cell. The CONTROL key is ignored. |
VK_RETURN | 0x0d | ENTER key - This key is handled by the EditNavigate method. Editing of the current cell ends and the next editable cell in the tree control is edited. The CONTROL and SHIFT keys are ignored. |
VK_ESCAPE | 0x1b | ESC key - This key is handled by the EditNavigate method. Cell editing is ended by calling EndEdit. |
VK_END | 0x23 | END key - This key is handled by the EditNavigate method if the CONTROL key is pressed. Editing of the current cell ends and the last editable cell in the tree control is edited. |
VK_HOME | 0x24 | HOME key - This key is handled by the EditNavigate method if the CONTROL key is pressed. Editing of the current cell ends and the first editable cell in the tree control is edited. |
VK_UP | 0x26 | UP ARROW key - This key is handled by the EditNavigate method if the CONTROL and SHIFT keys are not pressed. Editing of the current cell ends and the cell in the same column of the preceding item is edited. |
VK_DOWN | 0x28 | DOWN ARROW key - This key is handled by the EditNavigate method if the CONTROL and SHIFT keys are not pressed. Editing of the current cell ends and the cell in the same column of the next item is edited. |
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.
Shift
The state of the SHIFT, CONTROL and ALT keys (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 | Not used. The ALT key was pressed. |
Handled
Returns True if the key Key was handled by the EditNavigate method, otherwise False is returned.
The EditNavigate method positions cell editing on another cell.
The EditNavigate method implements default cell navigation for the virtual key codes Key and is called to handle navigation keys pressed during cell editing. These keys can be defined using the CellEditIntercept method. A key that is intercepted will generate the EditNavigating event so the application can handle the key by calling EditNavigate.
Combo1.Visible = True Combo1.Focus() Combo1.DroppedDown = True End If End Sub Private Sub AxSftTree1_EditNavigating(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_EditNavigatingEvent) Handles AxSftTree1.EditNavigating ' Process key pressed AxSftTree1.EditNavigate(e.key, e.shift) End Sub Private Sub AxSftTree1_EditValidate(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_EditValidateEvent) Handles AxSftTree1.EditValidate ' Validate the new cell contents Dim S As String If e.vData Is Text1 Then S = Text1.Text
Combo1.Visible = True Combo1.SetFocus SendMessage Window, CB_SHOWDROPDOWN, 1, 0 End If End Sub Private Sub SftTree1_EditNavigating(ByVal Key As Long, ByVal Shift As Integer, ByVal ItemIndex As Long, ByVal ColIndex As Integer) ' Process key pressed SftTree1.EditNavigate Key, Shift End Sub Private Sub SftTree1_EditValidate(ByVal Window As stdole.OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, InputValid As Boolean) ' Validate the new cell contents Dim S As String If Window = Text1.hwnd Then S = Text1.Text
Combo1.Visible = true; Combo1.Focus(); Combo1.DroppedDown = true; } } private void axSftTree1_EditNavigating(object sender, AxSftTreeLib75._DSftTreeEvents_EditNavigatingEvent e) { // Process key pressed axSftTree1.EditNavigate(e.key, e.shift); } private void axSftTree1_EditValidate(object sender, AxSftTreeLib75._DSftTreeEvents_EditValidateEvent e) { // Validate the new cell contents string s; if (e.vData == Text1) s = Text1.Text;
m_Combo1.SetFocus(); m_Combo1.ShowDropDown(); } } void CCellEditingDlg::OnEditNavigatingSftTree1(long Key, short Shift, long ItemIndex, short ColIndex) { // Process key pressed m_vTree->EditNavigate(Key, Shift); } void CCellEditingDlg::OnEditValidateSftTree1(long Window, const VARIANT FAR& vData, long EditIndex, short EditCol, BOOL FAR* InputValid) { // Validate the new cell contents CString str; if ((HWND)Window == m_Edit1.m_hWnd)
See Also SftTree Object | Object Hierarchy