AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Images Arrays zuordnen!

Ein Thema von foerster7892 · begonnen am 13. Apr 2008 · letzter Beitrag vom 14. Apr 2008
 
foerster7892

Registriert seit: 10. Okt 2007
Ort: Brieskow-Finkenheerd
181 Beiträge
 
#1

Images Arrays zuordnen!

  Alt 13. Apr 2008, 14:53
Ja das möchte ich machen und ich habe auch schon in anderen Foren geschaut leider bin ich zu blöd kann ich bitte hilfe haben?
(Mindmaster für InfoAG an der Schule soll das werden)

Delphi-Quellcode:
unit mastermind;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Image1: TImage;
    Image2: TImage;
    Image3: TImage;
    Image4: TImage;
    Image5: TImage;
    Image6: TImage;
    Image7: TImage;
    Image8: TImage;
    Image9: TImage;
    Image10: TImage;
    Image11: TImage;
    Image12: TImage;
    Image13: TImage;
    Image14: TImage;
    Image15: TImage;
    Image16: TImage;
    Image17: TImage;
    Image18: TImage;
    Image19: TImage;
    Image20: TImage;
    Image21: TImage;
    Image22: TImage;
    Image23: TImage;
    Image24: TImage;
    Image25: TImage;
    Image26: TImage;
    Image27: TImage;
    Image28: TImage;
    Image29: TImage;
    Image30: TImage;
    Image31: TImage;
    Image32: TImage;
    Image33: TImage;
    Image34: TImage;
    Image35: TImage;
    Image36: TImage;
    Image37: TImage;
    Image38: TImage;
    Image39: TImage;
    Image40: TImage;
    Image41: TImage;
    Image42: TImage;
    Image43: TImage;
    Image44: TImage;
    Image45: TImage;
    Image46: TImage;
    Image47: TImage;
    Image48: TImage;
    Image49: TImage;
    Image50: TImage;
    Image51: TImage;
    Image52: TImage;
    Image53: TImage;
    Image54: TImage;
    Image55: TImage;
    Image56: TImage;
    RadioGroup1: TRadioGroup;
    RadioGroup2: TRadioGroup;
    RadioGroup3: TRadioGroup;
    RadioGroup4: TRadioGroup;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  y: integer;
  Farbtipp: array[0..y,0..3] of Integer;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
{RadioButton1}
  Farbtipp[0,0]:=Image1;//<--das soll jeweils einem Feld zugeordnet werden aber er sagt immer *
  if RadioGroup1.ItemIndex=0
  then Image1.Picture.LoadFromFile('Blau.bmp');
  if RadioGroup1.ItemIndex=1
  then Image1.Picture.LoadFromFile('Rot.bmp');
  if RadioGroup1.ItemIndex=2
  then Image1.Picture.LoadFromFile('Grün.bmp');
  if RadioGroup1.ItemIndex=3
  then Image1.Picture.LoadFromFile('Gelb.bmp');
  if RadioGroup1.ItemIndex=4
  then Image1.Picture.LoadFromFile('Braun.bmp');
  if RadioGroup1.ItemIndex=5
  then Image1.Picture.LoadFromFile('Orange.bmp');
{RadioButton2}
  Farbtipp[0,1]:=image2;
  if RadioGroup2.ItemIndex=0
  then Image2.Picture.LoadFromFile('Blau.bmp');
  if RadioGroup2.ItemIndex=1
  then Image2.Picture.LoadFromFile('Rot.bmp');
  if RadioGroup2.ItemIndex=2
  then Image2.Picture.LoadFromFile('Grün.bmp');
  if RadioGroup2.ItemIndex=3
  then Image2.Picture.LoadFromFile('Gelb.bmp');
  if RadioGroup2.ItemIndex=4
  then Image2.Picture.LoadFromFile('Braun.bmp');
  if RadioGroup2.ItemIndex=5
  then Image2.Picture.LoadFromFile('Orange.bmp');
{RadioButton3}
  if RadioGroup3.ItemIndex=0
  then Image3.Picture.LoadFromFile('Blau.bmp');
  if RadioGroup3.ItemIndex=1
  then Image3.Picture.LoadFromFile('Rot.bmp');
  if RadioGroup3.ItemIndex=2
  then Image3.Picture.LoadFromFile('Grün.bmp');
  if RadioGroup3.ItemIndex=3
  then Image3.Picture.LoadFromFile('Gelb.bmp');
  if RadioGroup3.ItemIndex=4
  then Image3.Picture.LoadFromFile('Braun.bmp');
  if RadioGroup3.ItemIndex=5
  then Image3.Picture.LoadFromFile('Orange.bmp');
{RadioButton4}
  if RadioGroup4.ItemIndex=0
  then Image4.Picture.LoadFromFile('Blau.bmp');
  if RadioGroup4.ItemIndex=1
  then Image4.Picture.LoadFromFile('Rot.bmp');
  if RadioGroup4.ItemIndex=2
  then Image4.Picture.LoadFromFile('Grün.bmp');
  if RadioGroup4.ItemIndex=3
  then Image4.Picture.LoadFromFile('Gelb.bmp');
  if RadioGroup4.ItemIndex=4
  then Image4.Picture.LoadFromFile('Braun.bmp');
  if RadioGroup4.ItemIndex=5
  then Image4.Picture.LoadFromFile('Orange.bmp');
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
close
end;

end.
*incompatible types: 'Integer' and 'TImage' muss ich das jezt anders definiern also nich in integer?
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:01 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