Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Case of (Von bis) (https://www.delphipraxis.net/104210-case-von-bis.html)

HolgerCW 29. Nov 2007 10:04


Case of (Von bis)
 
Hallo zusammen,

Delphi-Quellcode:
Case Anzahl_Zeilen of

    41 - 1000: begin

    StringGrid.DefaultRowHeight := 12;
    StringGrid.RowHeights[0] := 24;
    StringGrid.Font.Size := 6;

             end;

    31 - 40: begin

    StringGrid.DefaultRowHeight := 14;
    StringGrid.RowHeights[0] := 24;
    StringGrid.Font.Size := 7;

             end;

    21 - 30: begin

    StringGrid.DefaultRowHeight := 18;
    StringGrid.RowHeights[0] := 24;
    StringGrid.Font.Size := 8;

            end;

    0 - 20: begin

    StringGrid.DefaultRowHeight := 24;
    StringGrid.Font.Size := 8;

            end;
   end;
Bei dem obigen Code sagt er mir doppeltes Case-Label ?

Was bedeutet das ?

Gruss

Holger

sirius 29. Nov 2007 10:07

Re: Case of (Von bis)
 
41..1000

DeddyH 29. Nov 2007 10:08

Re: Case of (Von bis)
 
Delphi-Quellcode:
Case Anzahl_Zeilen of
  41..1000: begin
            end;
  0..40   : begin
            end;
end;

Bernhard Geyer 29. Nov 2007 10:13

Re: Case of (Von bis)
 
Zitat:

Zitat von HolgerCW
Bei dem obigen Code sagt er mir doppeltes Case-Label ?

31-40 ist das gleiche wie 21-30 und zwar -9 :-)
Ansonsten hast du ja schon die passende Syntax für deine Wünsche bekommen

HolgerCW 29. Nov 2007 10:16

Re: Case of (Von bis)
 
... das wars, was ich gesucht habe.

Danke

Gruss

Holger


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