Autor Beitrag
Tomac
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 113

Win XP
D6 Ent
BeitragVerfasst: So 19.01.03 14:32 
Wieviel Items passen eigentlich in eine Listbox? Ich arbeite nämlich an einem MP3 Player und da verwende ich eine Listbox als Playlist, deshalb würde mich interessieren, wieviele denn in so eine Listbox reinpasst.
mfG
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 19.01.03 15:06 
Also das ist ein bischen umständlich zu ermitteln, aber ich würde sagen, da du wahrscheinlich die Items einer ListBox meinst, kommst du folgendermaßen darauf:

TListBox.Items ist vom Typ TStrings
TStrings.Capacity gibt die Anzahl von Einträgen in der StringListe an
TStrings.Capacity ist vom Typ Integer
d.h. die höchste Capacity ist die maximale Integergröße:

2 147 483 647

Das sind einige .mp3s.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Tomac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 113

Win XP
D6 Ent
BeitragVerfasst: So 19.01.03 15:07 
Wow, was ne Playlist!
Danke
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: So 19.01.03 18:30 
derDoc hat folgendes geschrieben:
2 147 483 647

Mit dem Problem, dass die ListBox noch aus der 16 Bit Zeit von Windows stammt. Aus diesem Grund liegt die durchschnittliche maximale Itemanzahl bei ca. 24000-32000 Zeilen. Dasselbe gilt für ein Multi Edit Control (auch als Memo bekannt).

_________________
Ist Zeit wirklich Geld?
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 19.01.03 18:39 
Nicht durchschnittlich:
Zitat:

Microsoft® Windows® 95/Windows 98/Windows Millennium Edition (Windows Me) : The wParam parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory.

Wenn ich das richtig interpretiere, gibt es diese Beschränkung unter NT basierenden System wohl nicht. Dort ist die Anzahl nur durch den verfügbaren Speicher begrenzt.
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 19.01.03 18:48 
@Luckie:
Und durch die Integer-Länge.

@AndyB:
Unter 9x Systemen hast du recht, ich hätte vielleicht schreiben sollen, dass ich ein NT basiertes System voraussetze. Dumme Angewohnheit von mir, zu glauben Programmierer benützten immer die neueste Software.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: So 19.01.03 19:53 
derDoc hat folgendes geschrieben:
Dumme Angewohnheit von mir, zu glauben Programmierer benützten immer die neueste Software.

Programmierer vielleicht eher als Benutzer. Und was bringt es dann einem, wenn das eigene Programm unter WinNT/2000/XP funktioniert, aber unter Win9x/ME die Liste leer (bzw. nicht vollständig) bleibt.

_________________
Ist Zeit wirklich Geld?
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 19.01.03 21:07 
Also ich ging davon aus, dass er das Programm für sich selbst schreibt. Aber selbst unter Windows 9x bleibt die Liste nicht leer.
Bei 24000 Einträgen sind das bei durchschnittlicher Qualität 24000 * 3MB = ca. 72 GB nur .mp3; das reicht sicher aus für seinen Player.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Tomac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 113

Win XP
D6 Ent
BeitragVerfasst: Mo 20.01.03 14:07 
Das Programm ist ne Facharbeit für die Matura. Und da ich daher auch einiges darüber schreiben muss, wollte ich auch angeben, wieviel Dateien man nun in eine Playlist speichern kann.
@Doc: du hast vollkommen recht, 24000 sind genug, ich glaube kaum, dass jemand mehr MP3s in einer Playlist haben möchte.

Vielen Dank an alle
Tomac