Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Problem beim Erstellen von TImage in ScrollBox (https://www.delphipraxis.net/159086-problem-beim-erstellen-von-timage-scrollbox.html)

thomas2009 13. Mär 2011 22:47


Problem beim Erstellen von TImage in ScrollBox
 
Hi
ich weiß nicht woran es liegt, dass der Code nicht richtig funktioniert, wenn die ScrollBox-Position nicht 0 ist !
Delphi-Quellcode:
with TImage.Create(self) do begin
     Parent := ScrollBox1;
    Width := 250;
     Height := 250;
     Left := 10;
    Top := 50;// nur wenn ScrollBox1.Pos:=0; sonst kommt tiefer !
Danke! Problem gelöst :
Delphi-Quellcode:
Top := 50 - ScrollBoxSource.VertScrollBar.Position;

s.h.a.r.k 14. Mär 2011 10:02

AW: Problem beim Erstellen von TImage in ScrollBox
 
Beachte aber auch, dass du Left auch entsprechend angepasst werden muss, nicht nur Top :thumb:


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:40 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