Autor Beitrag
Roy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 184

Windows7 Ultimate
Delphi 2007, NET, Embarcadero
BeitragVerfasst: Mi 04.05.11 17:26 
Hallo alle Miteinander!

Meine Frage: ist es möglich bedingt eines Textes ein Bild auslesen zu lassen?

Speziell: Wenn zbs. in einem Textfeld AOK (Label1.Caption)=AOK er mir das AOK Logo anzeigen.
Wenn zbs. in einem Textfeld GEK (Label1.Caption)=GEK er mir das GEK Logo anzeigen.

und des weiteren ...

Danke im voraus
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 04.05.11 17:33 
Sicher geht das, aber wobei liegt da jetzt dein Problem? :gruebel:
ausblenden Delphi-Quelltext
1:
MyImage.Picture.LoadFromFile(ExtractFilePath(ParamStr(0)) + MyLabel.Caption + '.jpg');					
Roy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 184

Windows7 Ultimate
Delphi 2007, NET, Embarcadero
BeitragVerfasst: Sa 07.05.11 15:08 
Konnte leider nicht früher Antworten. Habe es nun ausprobiert und es funktioniert. Danke
Roy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 184

Windows7 Ultimate
Delphi 2007, NET, Embarcadero
BeitragVerfasst: Mo 09.05.11 10:23 
Habe den Lösungsansatz über ein DBEdit verwendet und es funktioniert Prima.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Timer6Timer(Sender: TObject);
begin
Image14.Picture.LoadFromFile(ExtractFilePath(ParamStr(0)) + DBEdit3.Text + '.jpg');

end;


Möchte aber alle Imagedateien aus einen Extraordner auslesen lassen.
Eine weitere Frage wäre: kann man 2 Kreterien auslesen und vergleichen lassen.

Konkret: Wenn DBEdit1 mir den Vornamen und DBEdit2 den Nachnamen dann Vorschaubild aus Ordner Image ?

Danke für eure Antworten

Roy

Moderiert von user profile iconMartok: Delphi-Tags hinzugefügt
Tropby
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 71
Erhaltene Danke: 4

Vista, Win XP, Win 89
Turbo Delphi Ex.
BeitragVerfasst: Mo 09.05.11 11:06 
Hallo,

du kannst doch einfach mehrere Edit-Felder aneinander hängen.

ausblenden Delphi-Quelltext
1:
2:
3:
Image14.Picture.LoadFromFile(
    ExtractFilePath(Application.ExeName) + 'images\' + 
    DBEdit3.Text + '_' + DBEdit1.Text + '.jpg');

_________________
Tropby