Questions tagged [tmemo]

TMemo is a VCL component wrapping a standard Windows multiline edit control. It's defined in the StdCtrls.pas unit.

91 questions
1
vote
0 answers

Buttons popup on a TMemo on MouseEnter and disappears on MouseLeave

procedure TfrmMain.memInfoMouseEnter(Sender: TObject); begin if AktivArt then begin btnAddMemo.BringToFront; btnEditMemo.BringToFront; end; end; procedure TfrmMain.memInfoMouseLeave(Sender: TObject); begin btnAddMemo.SendToBack; …
Sjubussen
  • 51
  • 1
  • 8
1
vote
1 answer

How can I select the second copy of a text in a TMemo

I have a TMemo with text inside it, for example: Text1 Hello World! Sky Text123 I use a simple function to select the first time a text was found Memo1.SelStart := Pos(AnsiLowerCase('Text'), AnsiLowerCase(Memo1.Text)) - 1; Memo1.SelLength :=…
Codex
  • 101
  • 1
  • 11
1
vote
1 answer

How to execute my custom action when right-clicking on a TMemo control?

In a Delphi 10.4.2 32-bit VCL Application, I need to do different actions when the user (left- or right-)clicks on a TMemo control (which is in ReadOnly mode): procedure TForm1.Memo1MouseDown(Sender: TObject; Button: TMouseButton; Shift:…
user1580348
  • 5,721
  • 4
  • 43
  • 105
1
vote
2 answers

Get the caret position (line and char) in an FMX TMemo

I try to show the position of a memo's caret in a statusbar which contains two labels. I tried this: lblX.Text := Memo.Caret.Pos.X.ToString(); lblY.Text := Memo.Caret.Pos.Y.ToString(); The two values seems to represent the real position from left…
Selticq
  • 11
  • 2
1
vote
2 answers

Delphi Copy Memo to Richedit problem

I am having a problem copying the contents of a memo to a richedit component. I thought it would be Richedit.text := memo.text; However if I use this the Richedit starts a new line when the memo text wraps to a new a new line (not CR/LF) but just…
colin
  • 2,983
  • 6
  • 41
  • 49
1
vote
2 answers

Make TMemo show partially visible lines

Is it possible to make TMemo show partially visible lines? I'm looking for a native way to do that, without custom rendering. I made an example screenshot for those who not familiar with this issue: As you can see,, in the area I marked with red,…
Markus_13
  • 328
  • 2
  • 14
1
vote
2 answers

TMemo Scrolling in Delphi

I am adding lines of text to a TMemo using : Memo1.Lines.Add(Text), which causes Memo1 to scroll to the bottom. Is there any way to either stop it scrolling as I add lines, or force it to go back to the top when I finished? I want a simple…
Thomas Jomphe
  • 117
  • 6
  • 17
1
vote
1 answer

OSX scroll bars for TMemo and TListBox

Using Delphi XE7 Firemonkey I've dropped a TMemo on a blank form and then added more lines of text to the TMemo than it can hold (so that scrolling is necessary). On Windows everything works as expected. The vertical scroll bar appears when the…
Mike at Bookup
  • 1,211
  • 14
  • 32
1
vote
0 answers

PostgreSQL + Delphi XE7 + ADO + ODBC

Our application successfully communicates with various databases (MSSQL, Oracle, Firebird) via ADO, that's why I'm trying to use ADO to add the PostgreSQL option to our software. I use standard PostgreSQL ODBC provider. All was fine until I faced…
1
vote
1 answer

Memo lines to TreeView

Good night friends, I'm currently working on a project that involves enumeration of visible windows and their descendents (also visible). And I can transfer all nodes of TreeView for a Memo (in text format) one by one, but now I'm trying to do the…
1
vote
1 answer

Override event handler in C++ Builder

In Codegear C++ Builder, I'm trying to extend the TMemo VCL class to perform some functionality during the OnKeyDown event. I've set up the control and am able to add it to forms and so forth. The problem is that I am unable to capture the OnKeyDown…
ryan_nil
  • 55
  • 3
  • 8
1
vote
3 answers

Removing specific lines on memo

I have memo with unwanted character in lines, and I want to remove them all. Here is my code: var del: Integer; begin for del := 0 to m0.Lines.Count - 1 do begin if (AnsiContainsStr(m0.Lines[del], 'remove me')) then begin …
Bianca
  • 973
  • 2
  • 14
  • 33
1
vote
2 answers

TMemo cannot handle Unix text (LF as line ending) correctly

TMemo cannot handle Unix enters (LF) correctly. Two lines separated with a LF are shown and treated as one line. I want to handle all possible text formating (Mac, Win, Unix). Obviously I could check the text and replace the LF with CRLF every time…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
1
vote
2 answers

Cannot see UTF8-characters in Delphi 2010 Memo

I read an UTF8-File, made with Winword, into a Tmemo, using the code below (tried all 2 methods). The file contains IPA pronunciation characters. For these characters, I see only squares. I tried different versions of tmemo.font.charset, but it did…
Peter Graf
  • 23
  • 1
  • 7
1
vote
1 answer

Counting specific text in memo (Delphi)

I have a memo many 'mango' lines in it and I want to count how many times it finds the text 'mango'. var f, mango: Integer; begin mango := 0; for f := 0 to m0.lines.Count - 1 do begin if AnsiContainsStr(m0.lines[f], 'mango') then …
Bianca
  • 973
  • 2
  • 14
  • 33