Topic: How To Show line number in Memo And Use ShortCut In Memo

Why in memo can not use Shortcut CTRL + A (Select All)
and
How To Show line number in Memo ???

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: How To Show line number in Memo And Use ShortCut In Memo

Hello prahousefamily

Here is a clue :

procedure Form1_OnShow (Sender: string; Action: string);
var  NumberLine : integer;
begin
     Form1.Memo1.lines.Clear;
     for NumberLine := 0 to 100 do        // 100 is a fixed value. it can be changed
begin
     Form1.Memo1.lines.Add(inttostr(linenumber));
end;

end;

It's only a way.
Problem is when you make a line break.

JB

Re: How To Show line number in Memo And Use ShortCut In Memo

Re Hello prahousefamily

Another project about line number in a memo

Please see the attachment

To succeed, I put a memo (Memo1) where line number will stand and beside it I put another memo (Memo2) where you place your text.
There is no problem with line breaks.
But it does a little tinkering.
If someone has a more conventional idea.

JB

Post's attachments

Attachment icon Memo.zip 332.71 kb, 399 downloads since 2017-01-24 

Re: How To Show line number in Memo And Use ShortCut In Memo

prahousefamily wrote:

Why in memo can not use Shortcut CTRL + A (Select All)

Fixed, please download latest beta version
https://www.dropbox.com/s/1y0jek64gzfdy … a.zip?dl=0



prahousefamily wrote:

and
How To Show line number in Memo ???

It's not support by component.

Dmitry.

5 (edited by prahousefamily 2017-01-25 07:03:55)

Re: How To Show line number in Memo And Use ShortCut In Memo

jean.brezhonek Thank You Very much For Example OK  Easy Code Can use if fix line character limit 
... but can not use if memo2  word wrap  = true and word line 1 more than wide frame

Normal Frame OK ! Work IF Fix Number Character  limit
Memo1       Memo2
1------------- Line1Line1Line1Line1Line1Line1Line1Line1
2------------- Line2Line2Line2Line2Line2Line2Line2Line2 
3------------- Line3Line3Line3Line3Line3Line3Line3Line3


Mini size Frame Can not Use IF Mini size 
Memo1       Memo2
1                   Line1Line1Line
2                   1Line1Line1Line
3                   1Line1Line1
                     Line2 Line2Line2
                     Line2Line2Line2
                     Line2Line2 
                     Line3Line3Line3Line3Line
                     3Line3Line3Line3

Hi Dmitry. OK FIX  3.11 Beta can use Shortcut CTRL + A (Select All)
Thank You

My Visual Database : I Love You
Easy For Beginner Student For Me