'宣言 Public ReadOnly Property EditorResolved As Infragistics.Win.EmbeddableEditorBase
public Infragistics.Win.EmbeddableEditorBase EditorResolved {get;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTree Private Sub ultraTree1_AfterCellEnterEditMode(ByVal sender As Object, ByVal e As AfterCellEnterEditModeEventArgs) Handles ultraTree1.AfterCellEnterEditMode If e.Cell.EditorResolved.SupportsSelectableText Then Dim currentText As String = e.Cell.EditorResolved.CurrentEditText e.Cell.EditorResolved.SelectionStart = 0 e.Cell.EditorResolved.SelectionLength = currentText.Length End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTree; using System.Diagnostics; private void ultraTree1_AfterCellEnterEditMode(object sender, Infragistics.Win.UltraWinTree.AfterCellEnterEditModeEventArgs e) { if ( e.Cell.EditorResolved.SupportsSelectableText ) { string currentText = e.Cell.EditorResolved.CurrentEditText; e.Cell.EditorResolved.SelectionStart = 0; e.Cell.EditorResolved.SelectionLength = currentText.Length; } }