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
13
votes
3 answers

Automatically allowing Ctrl+A to select all in a TMemo?

In Delphi 7's TMemo control, an attempt to do the key combo Ctrl + A to select all does not do anything (doesn't select all). So I've made this procedure: procedure TForm1.Memo1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); var C:…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
11
votes
5 answers

Can I make a TMemo size itself to the text it contains?

When you edit a TLabel's caption in the form designer, it resizes the TLabel for you. Is there any way I can get a TMemo to do that, at runtime? I'd like to be able to take a TMemo, assign something to its .lines.text property, and then tell it to…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
7
votes
1 answer

Add lines to the top of a memo in Delphi

The function Memo.Lines.Add('Some text') in Delphi adds the string to the bottom of the memo. Is there any function which adds the text to the top? For example, if the Lines property of the Memo contains: string 1 string 2 string 3 I want to add a…
Tim Lâm
  • 124
  • 1
  • 2
  • 13
6
votes
2 answers

Delphi XE4 FireMonkey TMemo Transparent? (iOS)

Is there any way to make the TMemo transparent in Delphi/iOS/FireMonkey? I don't see any way to edit styles myself when selecting + right-clicking the memo control...
Tom
  • 3,587
  • 9
  • 69
  • 124
6
votes
2 answers

Maximum Length of String in Delphi property Lines of TMemo

I've been searching the reason why the maximum length of String in a TMemo.Lines is 1024, but not found yet. I have a text file which contains delimited / csv data which length is around 2000 characters. I use a memo to preview it before I process…
WishKnew
  • 649
  • 2
  • 10
  • 22
4
votes
1 answer

Why CTRL+C is not working on TMemo component? (Vista + Delphi 7)

why it is not possible to copy selected text in TDBMemo component into clipboard? DELPHI 7, Windows Vista. Following code fails to catch ctrl+c event, whereas ctrl+a works fine. uses clipbrd; procedure THierarchierForm.dbm1KeyDown(Sender:…
lyborko
  • 2,571
  • 3
  • 26
  • 54
4
votes
2 answers

In Delphi, Is there a way to adjust the line spacing of a TMemo?

I'm working with a TMemo component to display some text in a limited space. Currently it's using a truetype font which doesn't ship with windows and is installed by the app when it runs. On my PC (Running Windows XP), the spacing between each line…
Kieran
  • 718
  • 1
  • 16
  • 33
4
votes
2 answers

Is there a better way of adding a few characters to a TMemo?

I am using a TMemo to hold received characters from a serial port for viewing. As they arrive I am doing: Memo1.Text := Memo1.Text + sReceivedChars; This works fine but I presume it is rather inefficient, having to get the existing text before…
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
4
votes
1 answer

TMemo max width

Is there any way to make TMemo display text longer than 1024 into 1 line? Take a look this simple code: procedure TForm1.Button2Click(Sender: TObject); var s: string; i: integer; begin s := ''; for i := 0 to 10000 do s := s +…
Kawaii-Hachii
  • 1,017
  • 7
  • 22
  • 36
4
votes
2 answers

How to get Scrollbar notifications from a TMemo control?

I have a VCL TMemo control and need to be notified every time the text is scrolled. There is no OnScroll event and the scroll messages doesn't seem to propagate up to the parent form. Any idea of how to get the notification? As a last resort I can…
Max Kielland
  • 5,627
  • 9
  • 60
  • 95
3
votes
1 answer

Scrolling a Memo text using TTimer shows only the first 3 Lines

what i am trying to do right now is to create a scroling credit text using the TMemo component and TTimer procedure TAboutBox.Timer1Timer(Sender: TObject); begin Memo1.ScrollBy(0,-1); end; the Tmemo lines contain the text of the credit,…
Rafik Bari
  • 4,867
  • 18
  • 73
  • 123
3
votes
2 answers

How to change selected text attribute into bold in TMemo in delphi 7 ?

I use TMemo to be able to display multiple lines. I want to change selected text attribute in TMemo into bold using the shortcut Ctrl+B. For example, User enters "Hello, how are you?" in the Tmemo, I want when when user selects "How" and press…
Nalu
  • 1,107
  • 4
  • 20
  • 43
3
votes
2 answers

Is there a faster component than TMemo on CodeGear C++ Builder?

I'm using CodeGear C++ Builder 2009 and have problems with the TMemo component. It's too slow. I use it to display ASCII text from the COM serial port. I need to display every single symbol when it comes from the COM Serial port. The problem is, if…
Hitman_99
  • 2,252
  • 2
  • 19
  • 21
3
votes
4 answers

Enable scroll bars in disabled TMemo control

Is there a way how to enable scroll bars in disabled TMemo component ? I want let the users scroll the content even if the control's Enabled property is set to False. I know about the possible workaround with ReadOnly and color changes like in…
user532231
3
votes
1 answer

Calculating max chars per line in Delphi TMemo

I have a TMemo. I´d like to put some text in each line of TMemo without the line wordwrap. I need calculate how many characters I can put in a line without TMemo make a wordwrap in that line. pseudo code: function…
Luiz Alves
  • 2,575
  • 4
  • 34
  • 75
1
2 3 4 5 6 7