TMemo is a VCL component wrapping a standard Windows multiline edit control. It's defined in the StdCtrls.pas unit.
Questions tagged [tmemo]
91 questions
2
votes
1 answer
How to paste a custom format clipboard data into a TMemo?
This question refers to this one along with its accepted answer posted here on stackoverflow.
I don't feel comfortable at Windows API programming.
Exploring the way EasyGPS by Topografix handles clipboard manipulations, I discovered that it uses a…

menjaraz
- 7,551
- 4
- 41
- 81
2
votes
1 answer
How to interfere when user presses CTRL+X and still keep TMemo's default CTRL+X behavior?
I have a TMemo on the form and I've set an OnChange event for it. I hope the OnChange event not to be triggered when the user presses Ctrl+X in the memo. But Ctrl+X just cuts the text selection, which will for sure trigger the OnChange event. How…

Fajela Tajkiya
- 629
- 2
- 10
2
votes
4 answers
How do I determine the height of a line of text in a TMemo programmatically?
I've got a TMemo, and I want to always make it exactly high enough to display the number of lines it contains. Unfortunately, I don't quite know how to calculate that. I can't base it off the .Font.Size property, because that will vary based on…

Mason Wheeler
- 82,511
- 50
- 270
- 477
2
votes
1 answer
How to ask Delphi memo components (TMemo, TcxMemo) to recalculate line breaks? How to prevent the fixed wrapping of lines?
I am trying to use Delphi (Delphi 2009) TMemo and TcxMemo components - I have WordWrap=True and Scrollbars=[vertical scrollbar] and I am adding 4 very long text lines. The memo component automatically wraps those lines into several more lines and…

TomR
- 2,696
- 6
- 34
- 87
2
votes
6 answers
Delphi. Analog of Memo/RichEdit
Does anybody know if there is an analog of Memo/RichEdit? Demand: to number lines, to load big files (more than 5 MB) from a stream.

Michael
- 475
- 2
- 9
- 17
2
votes
1 answer
Convert a Vcl::Controls::TCaption aka (System::UnicodeString) to a const char *
I'm currently using C++Builder to create an application that copies text to the user's clipboard. I've placed a TMemo control and I want to contain that in a const char * variable as seen in the code below:
const char* output = TMemo1->Text;
When I…

Jordan Houston
- 47
- 8
2
votes
1 answer
Fast way to search lines of Tmemo
I have a TMemo on a form which allows users to enter a list of items. People can enter many items here. When they click Save the contents of the TMemo is checked and then added to the database.
I have a second list in a TStringList which I loop over…

Wizzard
- 12,582
- 22
- 68
- 101
2
votes
1 answer
How to get text position (in pixels) in TMemo?
I want to get the position/placement in pixels of a text (aWord) in a TMemo. My code is something like this:
var
Size: TSize;
Pt: Cardinal;
aWord: string;
x, y: Integer;
begin
...
Pt := Perform(EM_POSFROMCHAR, aStart-1, 0);
…

Gabriel
- 20,797
- 27
- 159
- 293
2
votes
2 answers
How to edit Text in Memo?
I wanted to use procedure Delete(Memo.Text, index, count) (or similar Insert). But I get message 'Constant object can not be passed as var parameter'. I know I can select text and to use this procedures with Seltext. But this way is a bit…

Runner
- 23
- 1
- 3
2
votes
2 answers
Lock the begining of the text in a TMemo
I would like to have a TMemo which will always begin with the string 'SELECT c_name FROM ' and I want to lock it so users cannot remove or replace this string in the TMemo, they will have to write their text AFTER this string. Can someone help me…

Moussamoa
- 417
- 1
- 4
- 19
2
votes
3 answers
How can I correctly downcast the pointer from void* to TMemo* in C++Builder2009?
I am writing multi-thread socket chat in C++Builder 2009.
It is almost complete in accordance with what I need to do but I have a little problem.
I need to pass the TMemo* pointer into CreateThread WinAPI function which upcasts it to void*.
I tryed…

chester89
- 8,328
- 17
- 68
- 113
2
votes
2 answers
Delphi - Memo Right Click Get Line Number
How do I get the line number of a memo when I right click on it?
A ListBox has .ItemAtPos but I've not been able to find a similar function
-Brad

Brad
- 2,237
- 5
- 41
- 69
2
votes
0 answers
How to add padding to a TCustomControl without losing the border "look and feel"?
I've written a custom TMemo, but noticed that the text was smack against the border with no padding at all. Although I could try and fix the issue inside the ClientRect by offsetting it, etc, it wouldn't be a very elegant solution at this stage.…

Jarno
- 103
- 3
- 7
2
votes
2 answers
Mouse Coordinates To Caret Position in Firemonkey TMemo Component
Handling Mouse / Drag&Drop Events on Firemonkeys TMemo Component offers Mousecursor Coordinates. Is there a way to calculate the CaretPosition out of the Mouse Coordinates?
I want to drag a text into a TMemo and this text should be inserted at…

Matthias Fuchs
- 121
- 2
- 12
2
votes
4 answers
How can I paste arbitrary data into a TMemo?
Copying and pasting text is easy enough, since it's built into TMemo, but it seems that it can only handle text. Seems to me that any kind of data can be represented as a string, though. If I copy some arbitrary data from another program and want…

Mason Wheeler
- 82,511
- 50
- 270
- 477