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
A key has been intercepted which is used for navigation during cell editing.
VB.NET | Private Sub object_EditNavigating(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.EditNavigating |
VB | Private Sub object_EditNavigating(ByVal Key As Long, ByVal Shift As Integer, ByVal ItemIndex As Long, ByVal ColIndex As Integer) |
C#.NET | void object_EditNavigating(object sender, EventArgumentType e); |
VC++ | void OnEditNavigatingobject(long Key, short Shift, long ItemIndex, short ColIndex); |
C | HRESULT OnEditNavigatingobject(long Key, short Shift, long ItemIndex, short ColIndex); |
object
Key
A virtual key code. Defines the key that was intercepted. See the CellEditIntercept method for a list of available virtual key codes.
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 | Not used. The ALT key was pressed. |
EditIndex
The zero-based index of the item being edited. The combination of EditIndex and EditCol describes an individual cell.
EditCol
The zero-based column number. The combination of EditIndex and EditCol describes an individual cell.
The EditNavigating event occurs when a key has been intercepted which is used for navigation during cell editing.
The CellEditIntercept method defines keystrokes to be intercepted during cell editing using the EditNavigating event. Only navigation keys should be intercepted. Other keys can be handled in the control's own event handlers (KeyDown/KeyPress/KeyUp events).
An application can handle a key by calling EndEdit to end cell editing of the current cell, followed by a call to Cell.Edit for the new cell to be edited.
Combo1.Height = e.heightPix Combo1.Enabled = True 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
' Combo1.Height = HeightPix * Screen.TwipsPerPixelY ' can't set height of a combo box Combo1.Enabled = True 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
Combo1.Height = e.heightPix; Combo1.Enabled = true; 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;
m_Combo1.MoveWindow(LeftPix, TopPix, WidthPix, HeightPix, TRUE); m_Combo1.EnableWindow(); m_Combo1.ShowWindow(SW_NORMAL); 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) {
See Also SftTree Object | Object Hierarchy