Thema: Delphi Font Frage

Einzelnen Beitrag anzeigen

hansklok

Registriert seit: 14. Apr 2004
Ort: Karlsruhe
318 Beiträge
 
Delphi 2010 Architect
 
#1

Font Frage

  Alt 6. Sep 2004, 18:49
Hallo,

ich habe hier eine Procedure. Wenn ich nun über Toolbuttons die unteren Formatierungsstyle verpasse, den funktioniert immer nur der letzte Style. In diesem Falle StrikeOut. Warum

Delphi-Quellcode:
procedure TForm1.GetStyles(var Font: TFont; var Pen: TPen; var Brush: TBrush);
begin
  Font.Color:= Panel6.Color;
  Font.Name:= ComboBox4.Text;
  Font.Size:= StrToInt(ComboBox5.Text);
  Pen.Color:= Panel6.Color;
  Pen.Style:= TPenStyle(Form2.ComboBox1.ItemIndex);
  Pen.Width:= Form3.ComboBox1.ItemIndex+1;
  Brush.Color:= Panel7.Color;
  Brush.Style:= TBrushStyle(Form2.ComboBox2.ItemIndex);
[b][color=blue] //FontStyle Formatierungsstyles
  if ToolButton23.Down then // funktioniert nicht
     Font.Style:= [fsBold] else Font.Style:= [];
  if ToolButton24.Down then // funktioniert nicht
     Font.Style:= [fsItalic] else Font.Style:= [];
  if ToolButton25.Down then // funktioniert nicht
     Font.Style:= [fsUnderline] else Font.Style:= [];
  if ToolButton26.Down then // funktioniert
     Font.Style:= [fsStrikeOut] else Font.Style:= [];[/[/color]b]
end;
Danke für eure Vorschläge!
  Mit Zitat antworten Zitat