Einzelnen Beitrag anzeigen

Bjoerk

Registriert seit: 28. Feb 2011
Ort: Mannheim
1.384 Beiträge
 
Delphi 10.4 Sydney
 
#22

AW: Schrift Größe

  Alt 2. Aug 2013, 16:56
@K-H

Was gibt's bei was von TStringlist ableiten nicht zu verstehen?
Oder gefällt die der Name der Klasse nicht?
Ext steht für Erweiterung und für was steht wohl Print?

So ungewöhnlich?

Hast du sowas ähnliches nicht zu Hause rumfliegen?

Delphi-Quellcode:
  TStringListPrintExt = class(TStringList)
  private
    FWantPageNumbers: boolean;
    FFontColor: TColor;
    FFontStyle: TFontStyles;
    FFontSize: integer;
    FLineSpacing: integer;
    FMarginLeft: integer;
    FMarginTop: integer;
    FOrientation: TPrinterOrientation;
    FFontName: string;
    FTitle: string;
    FFormFeed: char;
    FUsePageBreak: boolean;
    FUseLineBreak: boolean;
    FOnPrintingStrings: TOnPrintingStrings;
    function GetLineHeight: integer;
    function GetCanvasHeight: integer;
    function CheckForNewPage(const Y: integer; const S: string): integer;
    function GetLineWidth(const S: string): integer;
    function GetMaxLineWidth: integer;
    function TrimRightBlankOnly(const S: string): string;
    procedure DoLineBreak(Result: TStringList);
    procedure SetDefaults;
  public
    procedure Print;
    property WantPageNumbers: boolean read FWantPageNumbers write FWantPageNumbers;
    property FontColor: TColor read FFontColor write FFontColor;
    property FontStyle: TFontStyles read FFontStyle write FFontStyle;
    property FontSize: integer read FFontSize write FFontSize;
    property LineSpacing: integer read FLineSpacing write FLineSpacing;
    property MarginLeft: integer read FMarginLeft write FMarginLeft;
    property MarginTop: integer read FMarginTop write FMarginTop;
    property Orientation: TPrinterOrientation read FOrientation write FOrientation;
    property FontName: string read FFontName write FFontName;
    property FormFeed: char read FFormFeed write FFormFeed;
    property UsePageBreak: boolean read FUsePageBreak write FUsePageBreak;
    property UseLineBreak: boolean read FUseLineBreak write FUseLineBreak;
    property Title: string read FTitle write FTitle;
    property OnPrintingStrings: TOnPrintingStrings
      read FOnPrintingStrings write FOnPrintingStrings;
    constructor Create;
  end;
  Mit Zitat antworten Zitat