Jak ustalić sobie odstępy między....

0

Witam was! Mam taki kodzik, w którym mogę sobie pisać w Labelu w skompilowanym programie i teraz chcę jeszcze pisząc program ustalić sobie odstępy między literami w tym labelu w samym kodzie?

Nie chce w samym już programie robić spacjami odstępów między literami tylko w kodzie zrobić tak aby potem automatycznie mi się robiły odstępy jakie chcę. Za odpowiedź lub wskazówki z góry dziękuję. :-)

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Label1: TLabel;
procedure FormKeyPress(Sender: TObject; var Key: Char);

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Key<>chr(8) then
Label1.Caption := Label1.Caption + Key
else
label1.caption:=Copy(Label1.Caption, 1, Length(Label1.Caption) -1);
end;

end.

0

Troche cie nie kapuje, ale moze:

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Key<>chr(8) then
    Label1.Caption := Label1.Caption + Key + ' ';
  else
    Label1.Caption := Copy(Label1.Caption, 1, Length(Label1.Caption) -2);
end;

[???]

0

Dzięki wielkie, działa!!!! :))))) Pozdrawiam. [cya] :-)

1 użytkowników online, w tym zalogowanych: 0, gości: 1