Autor Beitrag
Stoffel1984
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 219

Win NT, Win 2000
D6 Prof
BeitragVerfasst: Sa 02.04.05 15:45 
Hallo,

ich will eine Scrollbox, in der ich zur laufzeit mehrere Buttons erstelle, mit weiteren buttons nach links oder rechts steuern.
Mach ich mit folgendem Code:

ausblenden Delphi-Quelltext
1:
  ScbBtns.ScrollBy(+50,0);					


Funktioniert soweit auch ganz gut. Nur: Ich kann auf diese Art auch weiter nach rechts oder links scrollen (also in den Bereich in dem gar keine Buttons mehr sind).
Das ganze soll ohne ne Scrollbar funktionieren. Gibts da irgendwie nen Fixpunkt am Beginn der Scrollbox (x0,y0)?
Irgendwie komm ich nicht weiter - hoffe ihr könnt mir helfen.
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: Sa 02.04.05 16:03 
Also ehrlichgesagt, versteh' ich dich nicht so richtig.. :( Hast du vllt. n Screenshot von deinem Programm? ;)
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: Sa 02.04.05 16:11 
Du hast dich eine Ausgangsstellung. Von der Scrollst du in eine Richtung, bis das Ende deiner Buttons erreicht ist. Dabei zählst du die ScrollBy-Werte hoch => Maximalwert. Wenn du weißt, wass der Maximalwert nach links und nach rechts ist, dann brauchst du nur noch ne if-Abfrage.

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
Stoffel1984 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 219

Win NT, Win 2000
D6 Prof
BeitragVerfasst: Sa 02.04.05 16:28 
Mhh das mitm hochzählen hab ich mir auch schon überlegt.
Dachte es geht vielleicht etwas eleganter - aber wenns keine andere Möglichkeit gibt werd ichs wohl so machen müssen.

Danke und schönes Wochenende!

Stoffel
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: Sa 02.04.05 16:29 
Ja, was ist?? :?