Vaya
Tambien este funcionó a la perfeccion.
Código Delphi
[-]unit UContadorLetras;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons;
type
TForm1 = class(TForm)
Memo1: TMemo;
StaticText1: TStaticText;
Label1: TLabel;
BitBtn1: TBitBtn;
procedure FormShow(Sender: TObject);
procedure Memo1Change(Sender: TObject);
private
public
end;
var
Form1: TForm1;
Letras: Integer;
implementation
{$R *.DFM}
procedure TForm1.FormShow(Sender: TObject);
begin
Letras := 0;
StaticText1.Caption := inttostr(Letras);
end;
procedure TForm1.Memo1Change(Sender: TObject);
var
Str: String;
i,j: integer;
begin
Str:= Memo1.Lines.Text;
j:= 0;
for i:= 1 to Length(Str) do
if (Str[i] <> #13) and (Str[i] <> #10) then
inc(j);
StaticText1.Caption:= IntToStr(j);
end;
end.
Muchas gracias seoane.