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
Determines whether a cell can be reached during cell editing.
VB.NET | Private Sub object_EditAllowed(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.EditAllowed |
VB | Private Sub object_EditAllowed(ByVal ItemIndex As Long, ByVal ColIndex As Integer, Allowed As Boolean) |
C#.NET | void object_EditAllowed(object sender, EventArgumentType e); |
VC++ | void OnEditAllowedobject(long ItemIndex, short ColIndex, VARIANT_BOOL* Allowed); |
C | HRESULT OnEditAllowedobject(long ItemIndex, short ColIndex, VARIANT_BOOL* Allowed); |
object
EditIndex
The zero-based item index of the item to be tested for cell editing. 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.
Allowed
Return True to allow editing of the specified cell, False otherwise.
The EditAllowed event determines whether a cell can be reached during cell editing.
It is called while a EditNavigate method is being processed, to determine whether a cell can be reached during cell editing. It is possible to suppress cell editing for items and cells using the Item.EditIgnore and Cell.EditIgnore properties. In addition, the EditNavigate method can be used to disallow editing of cells, even if the cell is otherwise editable.
If cell editing is suppressed for items and cells using the Item.EditIgnore and Cell.EditIgnore properties, the EditAllowed event does not occur for these items and cells.
Other than determining whether a cell can be reached during cell editing, this event should not take any other action or update the tree control in any way.
End If End If End Sub Private Sub AxSftTree1_ToolTipVScroll(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_ToolTipVScrollEvent) Handles AxSftTree1.ToolTipVScroll e.text = "Item " & e.itemIndex & " - " & e.text End Sub Private Sub AxSftTree1_EditAllowed(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_EditAllowedEvent) Handles AxSftTree1.EditAllowed ' Last chance to suppress cell editing for a cell 'If e.itemIndex = 1 And e.colIndex = 1 Then ' e.allowed = False 'End If End Sub Private Sub AxSftTree1_EditInitializing(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_EditInitializingEvent) Handles AxSftTree1.EditInitializing
End If End If End Sub Private Sub SftTree1_ToolTipVScroll(Text As String, ByVal ItemIndex As Long, ByVal ColIndex As Integer) Text = "Item " & ItemIndex & " - " & Text End Sub Private Sub SftTree1_EditAllowed(ByVal ItemIndex As Long, ByVal ColIndex As Integer, Allowed As Boolean) ' Last chance to suppress cell editing for a cell 'If ItemIndex = 1 And ColIndex = 1 Then ' Allowed = False 'End If End Sub Private Sub SftTree1_EditInitializing(Window As stdole.OLE_HANDLE, vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, LeftPix As stdole.OLE_XPOS_PIXELS, TopPix As stdole.OLE_YPOS_PIXELS, WidthPix As stdole.OLE_XSIZE_PIXELS, HeightPix As stdole.OLE_YSIZE_PIXELS)
Img.Appearance = SftPictureImageConstants.sftImageCheckboxNo; } } private void axSftTree1_ToolTipVScroll(object sender, AxSftTreeLib75._DSftTreeEvents_ToolTipVScrollEvent e) { e.text = "Item " + e.itemIndex.ToString() + " - " + e.text; } private void axSftTree1_EditAllowed(object sender, AxSftTreeLib75._DSftTreeEvents_EditAllowedEvent e) { // Last chance to suppress cell editing for a cell //if (e.itemIndex == 1 && e.colIndex == 1) // e.allowed = false; } private void axSftTree1_EditInitializing(object sender, AxSftTreeLib75._DSftTreeEvents_EditInitializingEvent e) { System.Windows.Forms.Control ctrl;
void CCellEditingDlg::OnToolTipVScrollSftTree1(BSTR FAR* Text, long ItemIndex, short ColIndex) { CString str; str.Format(_T("Item %ld - %s"), ItemIndex, (LPCTSTR)CString(*Text)); *Text = str.AllocSysString(); } void CCellEditingDlg::OnEditAllowedSftTree1(long ItemIndex, short ColIndex, BOOL FAR* Allowed) { // Last chance to suppress cell editing for a cell //if (ItemIndex == 1 && ColIndex == 1) // *Allowed = VARIANT_FALSE; } void CCellEditingDlg::OnEditInitializingSftTree1(long FAR* Window, VARIANT FAR* vData, long EditIndex, short EditCol, long FAR* LeftPix, long FAR* TopPix, long FAR* WidthPix, long FAR* HeightPix) {
See Also SftTree Object | Object Hierarchy