tutorials.de Buch-Aktion 05/2012
ERLEDIGT
JA
ANTWORTEN
2
ZUGRIFFE
443
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    Sticky84 Sticky84 ist offline Mitglied
    Registriert seit
    Oct 2005
    Beiträge
    13
    Hallo zusammen,

    hab ein kleines Problem.
    Ich habe eine ComboBox in die ich zwei Namen
    geschreiben habe.

    Als Beispiel:

    Alexandra
    Fred

    Nun will ich das der Spieler einen dieser Namen auswählt und
    in einem leeren Imagefeld die Grafik "Alexandra" lädt und anzeigt.
    Wie bekomme ich das hin?

    Danke euch für Hilfe.

    Gruß Sticky
     

  2. #2
    stimon stimon ist offline Mitglied Silber
    Registriert seit
    Jan 2005
    Beiträge
    67
    Hallo,

    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    void __fastcall TForm1::ComboBox1Click(TObject *Sender)
    {
    if(ComboBox1->ItemIndex==0){
    Image1->Picture->LoadFromFile("Dateiname");//z.B.: C:\\Alexandra.bmp
    }
    else if(ComboBox1->ItemIndex==1){
    Image1->Picture->LoadFromFile("Dateiname");//z.B.: C:\\Fred.bmp
    }
    }

    es geht so nur im BMP-Format.

    Gruß stimon
     

  3. #3
    Sticky84 Sticky84 ist offline Mitglied
    Registriert seit
    Oct 2005
    Beiträge
    13
    hi,

    danke dir es geht *freu*

    Bis denn denn

    Gruß Sticky
     

Ähnliche Themen

  1. ComboBox problem
    Von iced-angel im Forum Swing, Java2D/3D, SWT, JFace
    Antworten: 0
    Letzter Beitrag: 08.05.08, 20:38
  2. Problem bei ComboBox
    Von Supervreni im Forum Visual Basic 6.0
    Antworten: 2
    Letzter Beitrag: 26.10.07, 08:16
  3. Problem mit ComboBox
    Von FuMe im Forum .NET Windows Forms
    Antworten: 10
    Letzter Beitrag: 08.09.05, 08:39
  4. ComboBox problem {MX}
    Von skatos im Forum Flash Plattform
    Antworten: 1
    Letzter Beitrag: 28.04.04, 17:38
  5. Problem mit Combobox
    Von encom im Forum PHP
    Antworten: 9
    Letzter Beitrag: 07.12.03, 00:42