AGB  ·  Datenschutz  ·  Impressum  







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

ImageList Problem bei for-Schleife

Ein Thema von LoW_FloW · begonnen am 6. Mär 2004 · letzter Beitrag vom 9. Mär 2004
 
Benutzerbild von LoW_FloW
LoW_FloW

Registriert seit: 29. Nov 2003
117 Beiträge
 
Delphi 7 Professional
 
#1

ImageList Problem bei for-Schleife

  Alt 6. Mär 2004, 10:44
Ich habe mehrer Bilder und wenn man auf eins von den Bilder klickt, soll für das Bild ein anderes geladen werden. Dafür habe ich folgenden Source zusammen gestellt:
Delphi-Quellcode:
procedure TForm1.imgBackroundMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  i, Bild : integer ;
  imgLeft , imgWidth, imgTop, imgHeight : integer ;
begin
if klick = true then begin
  Bild := 0 ;
  for i := 1 to 33 do begin
    imgLeft := (findcomponent('Img'+inttostr(i)) as TImage).Left ;
    imgWidth := (findcomponent('Img'+inttostr(i)) as TImage).Width ;
    imgTop := (findcomponent('Img'+inttostr(i)) as TImage).Top ;
    imgHeight := (findcomponent('Img'+inttostr(i)) as TImage).Height ;
      if (X >= imgLeft) and (X <= imgLeft+ImgWidth ) and
          (Y >= ImgTop ) and (Y <= ImgTop +ImgHeight) then Bild := i ;
    end;
    if Bild > 0 then // <-- PROBLEM !!!!!!!!!
    FigurListe.GetBitmap(3, (findcomponent('Img'+inttostr(Bild)) as TImage).Picture.Bitmap) ;
  end;
end;
Nun habe ich das Problem, dass das Bild einfach nicht geladen wird ( FigurListe.GetBitmap(3, (findcomponent('Img'+inttostr(Bild)) as TImage).Picture.Bitmap) ). Setzte ich dafür zur Probe z.B. ein "Label1.Caprion := 'gehts?';" ein, funtzt es . Ich werde einfach nicht schlauer
  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 14:50 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz