Autor Beitrag
sabi_14
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Mi 06.08.08 10:25 
Hallo zusammen,
Ausgangslage:
Delphi 5, eine Liste cmbDBSection

möchte ich von dieser Liste die gewisse Elemente nicht anzeigen. Darum mache ich eine if-Abfrage.
nun kann es aber sein, dass das Listenelement mal anders geschrieben ist, als ich es geschrieben habe im Code.

if cmbDBSection.Items[i] = 'Bla' then
...

nun möchte ich gerne dieses Listenelement in einen String umwandeln, um das Element anschliessent in Grossbuchstaben umzuwandeln. Nun weiss ich aber nicht wie das funktioniert. Hoffe, dass mir da jemand helfen kann.

Danke schonmal im vorraus.

grüsse
Sabi
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mi 06.08.08 10:32 
UpperCase()

_________________
Markus Kinzler.
sabi_14 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Mi 06.08.08 10:36 
ok, aber dies brauche ich nur um alles in Grossbuchstaben umzuwandeln.
aber wie schaffe ich es, dass es zuerst in einen String umgewandelt wird?

grüsse
sabi
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8549
Erhaltene Danke: 478

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 06.08.08 10:38 
Wenn dieser Code durch den Compiler läuft if cmbDBSection.Items[i] = 'Bla' then, dann ist cmbDBSection.Items[i] ein String. Da muss man nichts umwandeln. :gruebel:

_________________
We are, we were and will not be.
sabi_14 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Mi 06.08.08 10:44 
Danke viel mal.
ich war schonmal so weit, aber da funktionierte es nicht.
jetzt habe ich herausgefunden warum.

grüsse
Sabi :P