Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Die Delphi-IDE (https://www.delphipraxis.net/62-die-delphi-ide/)
-   -   Mit Brush Color eine Zeile einfärben,danach wieder normal (https://www.delphipraxis.net/118340-mit-brush-color-eine-zeile-einfaerben-danach-wieder-normal.html)

egon.kaschuba 5. Aug 2008 19:29


Mit Brush Color eine Zeile einfärben,danach wieder normal
 
:?

Hallo,

Problem mit Brush.Ich habe es einfach Vergessen.
Ich möchte eine Zeile mit Brush.Color einfärben.
Danach sollte alle wieder normal weiter gehen.

Wer weiss weiter ?

Gruß
- Egon

Delphi-Quellcode:
 
     Canvas.Font.Name:='arial';   // Schriftgröße für Kundeninformation ein
     Canvas.Font.Size:=10;
     Canvas.Font.Color:=clNavy;
     Canvas.Brush.Color:=clRed;
     Canvas. font.Style:=[fsBold,fsItalic];

     Printer.Canvas.TextOut(3050,950,'Kundeninformation!');

     Canvas.Font.Name:='arial';        // Schriftgröße für Kundeninformation aus
     Canvas.Font.Size:=10;
     Canvas. font.Style:=[];
     Canvas.Font.Color:=clBlack;
// Hier Brush.Color Neutralisieren.

.
.
.

mkinzler 5. Aug 2008 19:31

Re: Mit Brush Color eine Zeile einfärben,danach wieder norma
 
Speichere dir doch die Farbe zwischen

egon.kaschuba 5. Aug 2008 19:40

Re: Mit Brush Color eine Zeile einfärben,danach wieder norma
 
Herr mkinzler ,

Die ganze Sache liegt im Druckermodus.
Wie soll ich das machen ?

Morphie 5. Aug 2008 19:54

Re: Mit Brush Color eine Zeile einfärben,danach wieder norma
 
ich vermute mal so in etwa...
Delphi-Quellcode:
var
  farbe: TColor;
begin
  Canvas.Font.Name:='arial';   // Schriftgröße für Kundeninformation ein
  Canvas.Font.Size:=10;
  farbe:=canvas.Brush.Color; //FARBE HIER ZWISCHENSPEICHERN
  Canvas.Font.Color:=clNavy;
  Canvas.Brush.Color:=clRed;
  Canvas. font.Style:=[fsBold,fsItalic];

  Printer.Canvas.TextOut(3050,950,'Kundeninformation!');

  canvas.Brush.Color:=farbe; //FARBE WIEDER ZURÜCKSETZEN
  Canvas.Font.Name:='arial';        // Schriftgröße für Kundeninformation aus
  Canvas.Font.Size:=10;
  Canvas. font.Style:=[];
  Canvas.Font.Color:=clBlack;

egon.kaschuba 5. Aug 2008 20:02

Re: Mit Brush Color eine Zeile einfärben,danach wieder norma
 
:P
Hallo Morphie,

Danke für den Tipp.
Ich habe meine Vergesslichkeit mit einem Tee
wieder flott gemacht,und zwar geht das auch mit
dem Code ....

Vielen Dank.


Delphi-Quellcode:
 canvas.brush.style :=bsClear;


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:36 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