AGB  ·  Datenschutz  ·  Impressum  







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

Page control

Ein Thema von schniede · begonnen am 29. Okt 2003 · letzter Beitrag vom 29. Okt 2003
Antwort Antwort
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.360 Beiträge
 
Delphi 12 Athens
 
#1

Re: Page control

  Alt 29. Okt 2003, 23:02
Delphi-Quellcode:
Unit Unit1;

Interface
  Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;

  Type TForm1 = Class(TForm)
      Procedure FormCreate(Sender: TObject);
      Procedure PageControlDrawTab(Control: TCustomTabControl; TabIndex: Integer; Const Rect: TRect; Active: Boolean);
    Private
      _clTabColors: Array[0..4] of TColor;
    End;

  Var Form1: TForm1;

Implementation
  {$R *.dfm}

  Procedure TForm1.FormCreate(Sender: TObject);
    Begin
      _clTabColors[0] := Farbe11;
      _clTabColors[1] := Farbe12;
      _clTabColors[2] := Farbe13;
      _clTabColors[3] := Farbe14;
      _clTabColors[4] := Farbe15;
    End;

  Procedure TForm1.PageControlDrawTab(Control: TCustomTabControl; TabIndex: Integer; Const Rect: TRect; Active: Boolean);
    Const _sTabCaptions: Array[0..4] of Otring = (' Hauptansicht', ' Einzelans.- Kunde', ' Best. Waren ges.', ' Warenlager', ' Eigene Umsätze');

    Begin
      Control.Canvas.Brush.Color := _clTabColors[TabIndex];
      Control.Canvas.FillRect(Rect);
      Control.Canvas.TextOut(Rect.Left+5,Rect.Top+3,_sTabCaptions[TabIndex]);
    End;

End.
oder so

Delphi-Quellcode:
Unit Unit1;

Interface
  Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;

  Type TForm1 = Class(TForm)
      Procedure FormCreate(Sender: TObject);
      Procedure PageControlDrawTab(Control: TCustomTabControl; TabIndex: Integer; Const Rect: TRect; Active: Boolean);
    End;

  Var Form1: TForm1;
    _clTabColors: Array[0..4] of TColor;

Implementation
  {$R *.dfm}

  Procedure TForm1.FormCreate(Sender: TObject);
    Begin
      _clTabColors[0] := Farbe11;
      _clTabColors[1] := Farbe12;
      _clTabColors[2] := Farbe13;
      _clTabColors[3] := Farbe14;
      _clTabColors[4] := Farbe15;
    End;

  Procedure TForm1.PageControlDrawTab(Control: TCustomTabControl; TabIndex: Integer; Const Rect: TRect; Active: Boolean);
    ...
End.
Ein Therapeut entspricht 1024 Gigapeut.
  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 14:57 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz