Forum > Packages and Libraries

Tmemo add char like typing

(1/2) > >>

eldonfsr:
is there a way to add char or string like typing  on  tmemo

i need trigger onkeypress like typing but mem.text := mem,text+'A'  or mem.lines[2] := mem.lines[2]+'A'

can be possible?

 

CM630:
I read your post multiple times, but I could not understand your question.

ackarwow:

--- Quote from: eldonfsr on December 05, 2024, 06:09:53 pm ---is there a way to add char or string like typing  on  tmemo

i need trigger onkeypress like typing but mem.text := mem,text+'A'  or mem.lines[2] := mem.lines[2]+'A'

can be possible?

--- End quote ---

Hi eldonfsr
There are no OnKeyPress events in this case but for example OnChange event is triggered.

eldonfsr:
well is onchange is is trigger when i typing but let play with it enable and disable event..

Remy Lebeau:

--- Quote from: eldonfsr on December 05, 2024, 06:09:53 pm ---is there a way to add char or string like typing  on  tmemo

--- End quote ---

It is not efficient to retrieve the entire Text, append to it, and then replace the entire Text.  Try this simpler approach instead:


--- Code: ---Mem.SelStart := Mem.GetTextLen;
Mem.SelLength := 0;
Mem.SelText := 'A';
--- End code ---

That will append the new text to the end of the Memo's internal data.

Navigation

[0] Message Index

[#] Next page

Go to full version