ToolStripTextBox.ScrollToCaret Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Scrolls the contents of the control to the current caret position.
public:
void ScrollToCaret();
public void ScrollToCaret ();
member this.ScrollToCaret : unit -> unit
Public Sub ScrollToCaret ()
Remarks
This method enables you to scroll the contents of the control until the caret is within the visible region of the control. If the caret is positioned below the visible region of the control, the ScrollToCaret method will scroll the contents of the control until the caret is visible at the bottom of the control. If the caret is positioned above the visible region of the control, this method scrolls the contents of the control until the caret is visible at the top of the control. You can use this method in a multiline text box to ensure that the current text entry point is within the visible region of the control.
Note
This method has no effect if the control does not have focus or if the caret is already positioned in the visible region of the control.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應