Autor Beitrag
eniac
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Mi 05.01.05 21:16 
Nabend allerseits,


ich hab ein simples Programm:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
//...
procedure TForm1.FormResize(Sender: TObject);
begin
  Image1.Align:=alClient;
  Image1.Canvas.Rectangle(0,0,Image1.Width,Image1.Height);
end;


Wenn ich das Fenster jetzt verkleinere, funktioniert alles wunderbar. Sobald ich das Fenster größer ziehe als es während des Erstellens gewesen ist, ist nicht mehr alles auf dem Image zu sehen :(

Woran liegt das?
Ich vermute, dass die Größe vom Image angepasst wird, die Zeichenfläche (Canvas) allerdings nicht! Wie kann ich das beheben?

Ich bin für jeden klugen Einfall dankbar!

_________________
Manche Leute haben den Horizont in Form eines Kreises mit Radius Null und das nennen sie dann einene Standpunkt.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 05.01.05 21:20 
Setze in der OnResize-Routine Image.Picture.Bitmap.Width und Image.Picture.Bitmap.Height auf Image.Width bzw. Image.Height. Dann sollte das funktionieren.

Die Image-Komponente kann nur auf dem Bereich gezeichnet werden, in dem auch ein Bild existiert...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
eniac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Mi 05.01.05 21:28 
Juuuuuhhhu :D !

Genau das hat mir gefehlt!
Übrigens Sorry, das ich Thread zweimal abgeschickt hab :oops:

_________________
Manche Leute haben den Horizont in Form eines Kreises mit Radius Null und das nennen sie dann einene Standpunkt.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 05.01.05 21:34 
NP. Hab eh nur den einen gesehen :D

Sag einfach nem Mod oder Admin beschied und geb denen den Link des zu killenden Threads ... Die erledigen das dann für Dich :D

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.