Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi jahreszahlen in combobox adden und sortieren ? (https://www.delphipraxis.net/78692-jahreszahlen-combobox-adden-und-sortieren.html)

agm65 9. Okt 2006 14:27


jahreszahlen in combobox adden und sortieren ?
 
Delphi-Quellcode:

for i := 1930 to yearof(now) do
begin
combobox.Items.Add(inttostr(i));
end;
jetzt hab ich leider von 1930 bis 2006 aber ich hätte gerne von 2006 bis 1930 also absteigend ..
wenn ich sorted auf true jetzte passiert nichts ?

danke euch !

Muetze1 9. Okt 2006 14:28

Re: jahreszahlen in combobox adden und sortieren ?
 
Delphi-Quellcode:
for i := 1930 to yearof(now) do
  combobox.Items.Insert(0, IntToStr(i));
Einfach rückwärts einfügen...

chaosben 9. Okt 2006 14:28

Re: jahreszahlen in combobox adden und sortieren ?
 
Versuchs doch mal mit
Delphi-Quellcode:

for i := yearof(now) downto 1930  do
begin
combobox.Items.Add(inttostr(i));
end;
:)

//edit: Manchmal scheint der Rot-Anteil in den Farbdefinitionen zu verschwinden. :)

agm65 9. Okt 2006 14:29

Re: jahreszahlen in combobox adden und sortieren ?
 
sau cool, wusste nicht das das geht ! danke dir !
geht wohl beides :) !


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