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
The new contents of the cell being edited are to be validated.
VB.NET | Private Sub object_EditValidate(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.EditValidate |
VB | Private Sub object_EditValidate(ByVal Window As OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, InputValid As Boolean) |
C#.NET | void object_EditValidate(object sender, EventArgumentType e); |
VC++ | void OnEditValidateobject(OLE_HANDLE Window, const _variant_t& vData, long EditIndex, short EditCol, VARIANT_BOOL* InputValid); |
C | HRESULT OnEditValidateobject(OLE_HANDLE Window, VARIANT vData, long EditIndex, short EditCol, VARIANT_BOOL* InputValid); |
object
Window
The window handle of the control being used for cell editing.
vData
Application-specific data provided as vData argument when Cell.Edit was called.
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.
InputValid
Return True if the contents are valid, False otherwise.
The EditValidate event occurs when the new contents of the cell being edited are to be validated.
The EditValidate event occurs when editing of one cell is about to end (the user clicks outside of the current cell being edited, cell navigation is handled or if the EndEdit(True) method is used. The EditValidate event allows the application to perform input validation. The new cell text currently contained in the control used for cell editing can be inspected and/or modified. If the text entered or selected is invalid, the InputValid variable can be set to False. This indicates that the new value cannot be accepted and cell editing is to be resumed. Setting InputValid to True (default), cell editing is ended.
If cell editing is aborted by the user by pressing the ESCAPE key, the EditValidate event is not generated.
The new cell contents can be saved while handling the EditEnding event.
The tree control properties cannot be modified during this event. If the tree control is updated in any way, cell editing is terminated. Use the EditEnding event to save the new cell contents.
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 Else S = Combo1.Text End If
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 Else S = Combo1.Text End If
} } 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; else s = Combo1.Text; s = s.Trim();
} 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) m_Edit1.GetWindowText(str); else m_Combo1.GetWindowText(str);
See Also SftTree Object | Object Hierarchy