AGB  ·  Datenschutz  ·  Impressum  







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

Problem mit Variablen bei for-Schleife

Ein Thema von LoW_FloW · begonnen am 26. Feb 2004 · letzter Beitrag vom 26. Feb 2004
 
Kinimod8

Registriert seit: 9. Jan 2004
Ort: Barsbüttel
317 Beiträge
 
Delphi 6 Personal
 
#7

Re: Problem mit Variablen bei for-Schleife

  Alt 26. Feb 2004, 17:50
Delphi-Quellcode:
procedure TForm1.imgBackroundMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  i, j : integer ;
begin
for i := 1 to 34 do begin
    j := (findcomponent('Image'+inttostr(i)) as TImage).Left;
    if X >= j
// if (X >= Image(i).Left) and (X <= Image(i).Left+Image(i).Width ) and
// (Y >= Image(i).Top ) and (Y <= Image(i).Top +Image(i).Height)
  then label1.Caption := 'JIIIHAelse label1.Caption := 'RAMSIIIM' ;
  end;
end;
So müsste es gehen...

Du darfst Left nicht in FindComponent reintun
Dominik Peters
  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 22:15 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