AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Eigener Kalender bauen

Ein Thema von Dumpfbacke · begonnen am 2. Sep 2016 · letzter Beitrag vom 6. Sep 2016
 
nahpets
(Gast)

n/a Beiträge
 
#4

AW: Eigener Kalender bauen

  Alt 3. Sep 2016, 13:49
Naja, Datum ist 'ne Zahl, ginge also z. B. in 'ner For-Schleife:
Delphi-Quellcode:
procedure ProcessOneDay(ADate: TDate; var ADateLabel: TLabel; var ADayLabel: TLabel; var ACountLabel: TLabel; var AFeld: TPanel??);
begin
  Case DayOfWeek(ADate) of
    1 : ADayLabel.Caption := 'Mo';
    2 : ADayLabel.Caption := 'Di';
    3 : ADayLabel.Caption := 'Mi';
    4 : ADayLabel.Caption := 'Do';
    5 : ADayLabel.Caption := 'Fr';
    6 : begin
          ADayLabel.Caption := 'Sa';
          ADateLabel.Font.Style := [fsBold];
          ADayLabel.Font.Style := [fsBold];
          AFeld.Color := clWebBISQUE
        end;
    7 : begin
          ADayLabel.Caption := 'So';
          ADateLabel.Font.Style := [fsBold];
          ADayLabel.Font.Style := [fsBold];
          AFeld.Color := clWebBISQUE
        end;
  end;
  if (EmptyStr <> Feiertage.IstFeiertag(ADate)) then begin
    ADateLabel.Font.Style := [fsBold];
    ADayLabel.Font.Style := [fsBold];
    AFeld.Color := clWebBISQUE;
    ADateLabel.Font.Color := clRed;
    ADayLabel.Font.Color := clRed;
    ACountLabel.Left := 50;
    ACountLabel.Width := 55;
    ACountLabel.Alignment := taLeftJustify;
    ACountLabel.Font.Color := clRed;
    ACountLabel.Font.Size := 7;
    ACountLabel.Top := 1;
    ACountLabel.Caption := Feiertage.IstFeiertag(ADate);
  end;
  if Feiertage.IstFerientag(ADate) then begin
    AFeld.Color := clYellow;
  end;
end;

var
      i : Integer;
begin
  For i := Trunc(StrToDate('01.01.2016')) to Trunc(StrToDate('31.12.2016')) do begin
    ProcessOneDay(i, DateLabel, DayLabel, CountLabel, Feld);
  end;
end;
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

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 17:48 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