バージョン

ScrollToCaret メソッド

現在のカレット位置にコントロールの内容をスクロールします。
シンタックス
'宣言
 
Public Sub ScrollToCaret() 
public void ScrollToCaret()
解説

注: AlwaysInEditMode プロパティが True に設定される場合に限って、ScrollToCaret メソッドは正しく機能します。

使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinEditors

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.UltraTextEditor1.AlwaysInEditMode = True
        Me.UltraTextEditor1.Multiline = True
        Me.UltraTextEditor1.Scrollbars = ScrollBars.Vertical
        Me.UltraTextEditor1.Text = "It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way- in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only."
    End Sub

    Private Sub UltraTextEditor1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraTextEditor1.Enter
        Me.UltraTextEditor1.ScrollToCaret()
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinEditors;
using System.Diagnostics;

		private void Form1_Load(object sender, System.EventArgs e)
		{
			this.ultraTextEditor1.AlwaysInEditMode = true;
			this.ultraTextEditor1.Multiline = true;
			this.ultraTextEditor1.Scrollbars = ScrollBars.Vertical;
			this.ultraTextEditor1.Text = "It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way- in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only.";
		}

		private void UltraTextEditor1_Enter(object sender, System.EventArgs e)
		{
			this.ultraTextEditor1.ScrollToCaret();		
		}
参照