Discussion of article "Graphical Interfaces X: Text selection in the Multiline Text box (build 13)"

 

New article Graphical Interfaces X: Text selection in the Multiline Text box (build 13) has been published:

This article will implement the ability to select text using various key combinations and deletion of the selected text, similar to the way it is done in any other text editor. In addition, we will continue to optimize the code and prepare the classes to move on to the final process of the second stage of the library's evolution, where all controls will be rendered as separate images (canvases).

The CTextBox::DeleteSelectedText() method is called not only when pressing the Backspace key, but also: (1) when entering a new character and (2) when pressing the Enter key. In these cases, the text is deleted first, and then the action corresponding to the pressed key is performed.

This is how it looks in the finished application:

 Fig. 7. Demonstration of deleting the selected text.

Fig. 7. Demonstration of deleting the selected text.

Author: Anatoli Kazharski

Reason: