![Delphi caret position tedit](https://kumkoniak.com/3.jpg)
![delphi caret position tedit delphi caret position tedit](https://img-19.ccm2.net/8MWK8DL3Qc6TLrpLIllFW9oWRg0=/600x/b6c9043a919245ec93b705774990e58f/cs-source/49JFwaAy-12297.png)
em_GetFirstVisibleLine tells us the index of the current top lineĢ.3 - The control creation As already presented in the 3d Graphic Designer.
Delphi caret position tedit windows#
The scrolling is done using Windows API calls (or sending Windows messages): To find the index of a line, we simply added a function which compares the find the line (index or string) of the Caret.
![delphi caret position tedit delphi caret position tedit](https://4.bp.blogspot.com/-udxiz6UtvJU/TjD1dvUOLxI/AAAAAAAAAic/_mZq4iI7wp0/s200/TEdit+create.jpg)
However, the tMemo lacks some methods which could be useful: The Lines PROPERTY is computed upon loading (in assembler). Like the Caption PROPERTY, it simple reads or write the string that Windows saves along with the position parameters, the handle etc. The Text PROPERTY allows to get or set the text. In addition to the display attributes, Left, Top, etc, Delphi added the Lines and Text PROPERTIEs.
![delphi caret position tedit delphi caret position tedit](https://txtgreat150.weebly.com/uploads/1/2/4/2/124289577/531834886.png)
direct search with Pascal test and loops.search algorithm (Boyer More Horspool etc).To search a pattern in a string, there are many possibilities: This is why we created the c_find_memo.Ģ - Organization 2.1 - The search function The control will be a tMemo descendent (or container) with the added search functionality. The basic tMemo does not include a "find" function. It sometimes happens that in huge debug logs, we want to find some string patterns. scope : Delphi 1 to 8 for Windows, Kylixġ - Introduction As you might have noticed, we very often use tMemos in our applications, forĭebug or display purposes.hardware used : Pentium 1.400Mhz, 256 M memory, 140 G hard disc.key words : tMemo - Search function - Line of Caret - Scroll to Caret.The found occurences are highlighted and the text scrolls to this position With "find", "find next" and save functions. abstract : the e c_find_memo unit allows to place on a tForm a tMemo.
![Delphi caret position tedit](https://kumkoniak.com/3.jpg)