Normal View

Technical Articles > Text Formatting and Views

With the PageWidth and PageHeight properties the formatting area can be changed by the programmer. This is necessary to realize a text editor that formats the text accordingly to a certain page width. The ViewMode property must be set to 0 - Normal for this view. In normal view the formatting height - the amount the user can scroll - depends on the current amount of text.

When the formatting width and/or height is greater than the current control size and the caret reaches the control's borders, scrolling is performed automatically to make the new input position visible. In addition, a horizontal and/or a vertical scroll-bar can be used to scroll to text parts outside of the client area without changing the current input position. Scrollbars can be set through the ScrollBars property.

If the Text Control is sized the text is not newly formatted and if the Text Control is zoomed the control's size and position are not changed. If the control is sized, visible scrollbars are automatically hidden when they are no longer needed. Conversely, previously hidden scrollbars are automatically shown when the control's size becomes smaller.