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 control used for cell editing is initialized.
VB.NET | Private Sub object_EditInitializing(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.EditInitializing |
VB | Private Sub object_EditInitializing(Window As OLE_HANDLE, vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, LeftPix As OLE_XPOS_PIXELS, TopPix As OLE_YPOS_PIXELS, WidthPix As OLE_XSIZE_PIXELS, HeightPix As OLE_YSIZE_PIXELS) |
C#.NET | void object_EditInitializing(object sender, EventArgumentType e); |
VC++ | void OnEditInitializingobject(OLE_HANDLE* Window, const _variant_t&* vData, long EditIndex, short EditCol, OLE_XPOS_PIXELS* LeftPix, OLE_YPOS_PIXELS* TopPix, OLE_XSIZE_PIXELS* WidthPix, OLE_YSIZE_PIXELS* HeightPix); |
C | HRESULT OnEditInitializingobject(OLE_HANDLE* Window, VARIANT* vData, long EditIndex, short EditCol, OLE_XPOS_PIXELS* LeftPix, OLE_YPOS_PIXELS* TopPix, OLE_XSIZE_PIXELS* WidthPix, OLE_YSIZE_PIXELS* HeightPix); |
object
Window
Returns the window handle of the control being used for cell editing. Initially, this argument contains the value passed as the Window argument of the Cell.Edit method.
vData
Returns application-specific data. Initially, this argument contains the application-specific data passed as the vData argument of the Cell.Edit method.
EditIndex
The zero-based index of the item being edited. The combination of ItemIndex and ColIndex describes an individual cell.
EditCol
The zero-based column number. The combination of ItemIndex and ColIndex describes an individual cell.
Left
Returns the coordinate of the desired left edge of the control used for cell editing. Initially, this argument contains the left edge of the cell to be edited. Coordinates are in pixels and relative to the top, left edge of the control's client area.
Top
Returns the coordinate of the desired top edge of the control used for cell editing. Initially, this argument contains the top edge of the cell to be edited. Coordinates are in pixels and relative to the top, left edge of the control's client area.
Width
Returns the desired width of the control used for cell editing. Initially, this argument contains width of the cell to be edited. Dimensions are in pixels.
Height
Returns the desired height of the control used for cell editing. Initially, this argument contains the height of the cell to be edited. Dimensions are in pixels.
The EditInitializing event occurs when the control used for cell editing is initialized.
The initializing event is used to make a control for cell editing available, by returning a control window handle (Window). The control's display attributes and contents should be fully initialized by this event. Its dimensions and position should be returned in the Left, Top, Width, Height arguments.
The control's position cannot be set in the EditInitializing event, instead the EditInitialized event is used. Only the width and height of the control can be updated in the EditInitializing event (or also in the EditInitialized event).
The CellEditIntercept method can be used to define navigational keys and other keystrokes that should be intercepted while cell editing. The EditNavigating event occurs when keystrokes are intercepted.
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 Dim ctrl As System.Windows.Forms.Control ' Choose a control based on current column being edited If e.editCol = 1 Then ctrl = Combo1 Else ctrl = Text1 End If
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) Dim ctrl As Control ' Choose a control based on current column being edited If EditCol = 1 Then Set ctrl = Combo1 Else Set ctrl = Text1 End If
} 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; // Choose a control based on current column being edited if (e.editCol == 1) ctrl = Combo1; else ctrl = Text1;
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) { HWND hwndControl; // Choose a control based on current column being edited if (EditCol == 1) hwndControl = m_Combo1.m_hWnd; else hwndControl = m_Edit1.m_hWnd;
See Also SftTree Object | Object Hierarchy