Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Der Letzte soll der erste sein (https://www.delphipraxis.net/3046-der-letzte-soll-der-erste-sein.html)

CalganX 19. Feb 2003 15:48


Der Letzte soll der erste sein
 
Hi,
ich glaube ich habe in Mathe nicht aufgepasst, deswegen meine Frage (vielleicht habe ich auch keine Idee, wie das gehen soll :mrgreen: ):
In einer Listbox sind einige Einträge drin. Ich brauch immer eine ID. Der Letzte Eintrag hat die ID 1 der vorletzte 2 uswusf.
Wie kann man das "Mathematisch" lösen???

Chris

Sharky 19. Feb 2003 16:10

Re: Der Letzte soll der erste sein
 
Zitat:

Zitat von Chakotay1308
...
Wie kann man das "Mathematisch" lösen???
Chris

In dem man rechnet :lol:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);

begin
  Label1.Caption := IntToStr (ListBox1.Items.Count - ListBox1.ItemIndex);
end;


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