AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Font Frage

Ein Thema von hansklok · begonnen am 6. Sep 2004 · letzter Beitrag vom 6. Sep 2004
Antwort Antwort
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
Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#2

Re: Font Frage

  Alt 6. Sep 2004, 18:56
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);
  Font.Style := [];
  if ToolButton23.Down then
     Font.Style:= Font.Style + [fsBold];
  if ToolButton24.Down then
     Font.Style:= Font.Style + [fsItalic];
  if ToolButton25.Down then
     Font.Style:= Font.Style + [fsUnderline];
  if ToolButton26.Down then
     Font.Style:= Font.Style + [fsStrikeOut];
end;
Versuch es mal so

mfG
mirage228
David F.

May the source be with you, stranger.
PHP Inspection Unit (Delphi-Unit zum Analysieren von PHP Code)
  Mit Zitat antworten Zitat
hansklok

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

Re: Font Frage

  Alt 6. Sep 2004, 19:04
Danke, hat funktioniert. Ich habe gesehen, du arbeitest mit Delphi 8 Professional, hast du als Schüler so viel Geld?
  Mit Zitat antworten Zitat
Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#4

Re: Font Frage

  Alt 6. Sep 2004, 19:44
Zitat von hansklok:
Danke, hat funktioniert. Ich habe gesehen, du arbeitest mit Delphi 8 Professional, hast du als Schüler so viel Geld?
Hi,

bitte sehr -
zu Delphi 8: meine Eltern haben mir das Upgrade auf Delphi 8 (von Delphi 3 Prof.) zu Weihnachten geschenkt.

mfG
mirage228
David F.

May the source be with you, stranger.
PHP Inspection Unit (Delphi-Unit zum Analysieren von PHP Code)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:08 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz