Autor Beitrag
JanisN
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

WIN XP
Delphi 2005
BeitragVerfasst: Do 21.04.05 17:18 
Hallo,
ich hab ein kleines Problem mit meinem ShellTreeView, den ich in eine ScrollBox gepackt habe.
Wenn ich keinen node ausgewählt habe, in der Scrollbox runter scrolle und dann irgendwohin klicke (in der Scrollbox) dann springt die Scrollbox wieder nach ganz oben. Wenn ich also ein Verzeichnis im TreeView auswählen will, dann muss ich um das ausgewählte Verzeichnis auch zu sehen also wieder runterscrollen (unschön!)
Sobald allerdings irgendein node ausgewählt ist, funktioniert alles einwandfrei.
Kann ich dieses scrollen irgendwie verhindern??
Das einzige was ich bisher gefunden hab ist eine neue komponente von der Scrollbox abzuleiten usw. sowas wie "OnScroll" und dann die Position vom SelectedNode zu ermitteln und wieder dorthin zu scrollen. Aber das erscheint mir ein bisschen zu kompliziert...
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Do 21.04.05 17:54 
Was willst du mit der Scrollbox??????????????
Das ShellTreeView hat eine Scrollbar integriert(!)---> muss du im Objektinspektor nur ggf. aktivieren.
Die ScrollBox kannst du weglassen.

_________________
Programmers never die, they just GOSUB without RETURN
JanisN Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

WIN XP
Delphi 2005
BeitragVerfasst: Do 21.04.05 18:01 
Ich hab in der Scrollbox halt nicht nur den TreeView sondern auch noch Comboboxen um Einstellungen für die einzelnen Verzeichnisse vorzunehmen...
cartridge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 209

Win XP
D4 Prof,D6 Prof
BeitragVerfasst: Sa 23.04.05 20:19 
Das Problem ist Delphi- typisch. Ich wüsste nicht, dass man das irgendwie beheben kann, außer dass Du ein Verzeichnis vorselektierst. Das gleiche Penomen haben auch alle Trees in der IDE, wenn kein Node selektiert ist.

Gruß
Ingo