bool CenterOnScroll { get; set; }

robot_2Generated
code_blocksInput

Description

The CenterOnScroll property of the TextEdit class determines whether the text view should automatically center the text cursor when the user scrolls. This can be useful for keeping the cursor in view when navigating through large blocks of text.

Usage

To use the CenterOnScroll property, simply set it to true or false depending on whether you want the text to center on the cursor during scrolling. This property is particularly useful in scenarios where maintaining the cursor's visibility is important for user interaction.

Example

// Create a new TextEdit instance
TextEdit textEdit = new TextEdit();

// Enable centering on scroll
textEdit.CenterOnScroll = true;

// Disable centering on scroll
textEdit.CenterOnScroll = false;