SftTree/OCX 7.0

SftTree.EditInitialized Event

Softel vdm, Inc.

Cell editing is about to start.

Syntax       

VB.NET

Private Sub object_EditInitialized(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.EditInitialized

VB

Private Sub object_EditInitialized(ByVal Window As OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, ByVal ParentWindow As OLE_HANDLE, ByVal LeftPix As Long, ByVal TopPix As Long, ByVal WidthPix As Long, ByVal HeightPix As Long, Positioned As Boolean)

C#.NET

void object_EditInitialized(object sender, EventArgumentType e);

VC++

void OnEditInitializedobject(OLE_HANDLE Window, const _variant_t& vData, long EditIndex, short EditCol, OLE_HANDLE ParentWindow, long LeftPix, long TopPix, long WidthPix, long HeightPix, VARIANT_BOOL* Positioned);

C

HRESULT OnEditInitializedobject(OLE_HANDLE Window, VARIANT vData, long EditIndex, short EditCol, OLE_HANDLE ParentWindow, long LeftPix, long TopPix, long WidthPix, long HeightPix, VARIANT_BOOL* Positioned);

Delphi

procedure objectEditInitialized(Sender: TObject; Window : Cardinal; vData : OleVariant; EditIndex : Integer; EditCol : Smallint; ParentWindow : Cardinal; LeftPix : Integer; TopPix : Integer; WidthPix : Integer; HeightPix : Integer; var Positioned : WordBool);

object

A SftTree 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.

ParentWindow

The window handle of the window hosting the control used for cell editing.

LeftPix

The x coordinate of the control used for cell editing in pixels.  This value was determined and returned by the EditInitializing event.

TopPix

The y coordinate of the control used for cell editing in pixels.  This value was determined and returned by the EditInitializing event.

WidthPix

The width of the control used for cell editing in pixels.  This value was determined and returned by the EditInitializing event.

HeightPix

The height of the control used for cell editing in pixels.  This value was determined and returned by the EditInitializing event.

Positioned

Return True if the control used for cell editing was positioned by the application in the EditInitialized event.  The application also must make the control visible, enabled and set the input focus to the control.

If False is returned, the tree control will position the control, enable the control, make it visible and set the input focus to the control. 

Comments

The EditInitialized event occurs when cell editing is about to start.

Cell editing is about to start.  The EditInitializing event, which precedes the EditInitialized event, has initialized a control for cell editing (described by the Window argument).

This event can be used to perform final control initialization.  The control's position and dimension can be set, based on the LeftPix, TopPix, WidthPix, HeightPix arguments.  The application also must make the control visible, enabled and set the input focus to the control.  If Positioned is set to False, the tree control will automatically position the control used for cell editing, make the control visible, enabled and set the input focus to the control. However, many environments (including .NET) and ActiveX controls require that the application make controls visible and enabled explicitly.

Additional final customizations can be performed.  For example, when a combo box is used, this event can drop down the dropdown portion of the edit control.

This event should not be used to otherwise initialize a control used for cell editing, nor should the tree control manipulated or updated in any way.

See Also  SftTree Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com