Autor Beitrag
September
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Di 08.02.05 20:26 
Kurze Frage, kurze Antwort :

Ich habe eine Imagekomponente und möchte ein Bild an einem bestimmten Punkt platzieren, wie mache ich das?

Das Bild lade ich mit :

Image1.Picture.LoadFromFile('c:\neuerOrdner\karte1.bmp');

Habe bisher nur mit Canvas gearbeitet, aber moveto klappt verständlicher Weise nicht.

Danke für eure Hilfe,
September
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 08.02.05 20:36 
Sehr richtig. Kurze Frage, kurze Antwort. ;)

Mit Image1.Left und Image1.Top kannst du den Abstand von Image1 von linken Rand und vom oberen Rand von deinem Formular bestimmen.

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
September Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Di 08.02.05 20:41 
Ich wollte aber ein Picture im Imagefenster positionieren und nicht das Image positionieren ;). (oder ist es dieselbe Methode nur mit Picture? und wenn ja, wie verbinde ich es so, dass es beim Laden da platziert wird).
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 08.02.05 20:59 
Okay. :lol:

Soweit ich weiß, kann man's nur in die Mitte hocken... :(

Aber du kannst ja Image auf Autosize stellen und dann ist das Image-Objekt genausogroß wie dein Picture und du kannst es wieder rumschieben.

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
September Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Di 08.02.05 21:00 
Na das kann ja nicht die Lösung sein, und ich werde mindestens 32 Objekte im Imagefenster positionieren, deine Version ist also nicht wirklich sinnvoll.

Außerdem kann man, wenn man mit Canvas zeichnet, auch Koordinaten im Imagefenster ansprechen, das muss dann doch auch mit anderen Dingen gehen.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 08.02.05 21:03 
September hat folgendes geschrieben:
Na das kann ja nicht die Lösung sein, und ich werde mindestens 32 Objekte im Imagefenster positionieren, deine Version ist also nicht wirklich sinnvoll.

Huch, also du lädst mehrere Bilder in ein TImage?? :gruebel:

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
September Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Di 08.02.05 21:04 
Klar, warum auch nicht?
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 08.02.05 21:16 
Darf man fragen, wieso?? :D Nur, damit wir hier nicht irgendwie eine Lösung für was suchen, was anders viel einfacher geht. ;)

ausblenden Offtopic:
1:
 Wie macht man das denn??					

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
September Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Di 08.02.05 21:21 
Also ich möchte das Geben der Karten bei einem Skatspiel simulieren.
Das Projekt findest du hier, falls du es dir ansehen willst.
Ich möchte jetzt für die Worte die entsprechenden Karten einfügen und da in meinem Delphi Buch beim Laden eines Bilder das stand :

Image1.Picture.LoadFromFile('c:\Dateipfad');

dachte ich mir, dass ich für das Picture natürlich erstmal eine Image Komponente bräuchte (wo sollte er es sonst hinladen?).
Deswegen auch 32 Objekte, weil 32 Karten.

Grüße,
September
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 08.02.05 21:32 
Ich versteh' immer noch nicht ganz, wieso du dann nicht einfach 32 TImage-Objekte holst. Jedes davon eine Karte ist, also jedes lädt am Anfang sein Bild mit ImageX.Picture.LoadFromFile und du kannst das Zeug dann mit .Left und .Top dahinschieben, wo du willst!

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
September Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Di 08.02.05 21:34 
Achso,... ja, klar (schade, dass es hier nicht den Smily gibt, der sich selbst vor den Kopf haut).
Natürlich hast du Recht.
Entschuldige, dass ich solange gebraucht habe, zu verstehen.
Ich versuche es gleich mal.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 08.02.05 21:36 
Kein Problem. :lol:

Ich kann dir sogar bei dem Smilie helfen: :autsch:

:lol:

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.