unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
RichEdit1: TRichEdit;
RadioGroup1: TRadioGroup;
procedure RadioGroup1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
RichEdit1.Clear;
RadioGroup1.Items.Add('
Linksbündig');
RadioGroup1.Items.Add('
Rechtsbündig');
RadioGroup1.Items.Add('
Zentriert');
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex
of
0: RichEdit1.Paragraph.Alignment := taLeftJustify;
1: RichEdit1.Paragraph.Alignment := taRightJustify;
2: RichEdit1.Paragraph.Alignment := taCenter;
end;
end;
end.