Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Get Memo current line
Use EM_LINEFROMCHAR message for Memo:
procedure TForm1.Memo1KeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
LineNum: LongInt;
begin
if (Key=VK_UP)or(Key=VK_DOWN) then
begin
LineNum:=Memo1.Perform(EM_LINEFROMCHAR, Memo1.SelStart, 0);
Label1.Caption:='Line - '+IntToStr(LineNum+1);
end;
end;
-
More for developers