AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

ScrollBox ohne Wheel funktion ?

Ein Thema von Tau · begonnen am 19. Okt 2003 · letzter Beitrag vom 20. Okt 2003
Antwort Antwort
Tau

Registriert seit: 17. Mär 2003
Ort: Bludenz
221 Beiträge
 
Delphi 7 Enterprise
 
#1

ScrollBox ohne Wheel funktion ?

  Alt 19. Okt 2003, 17:59
Hallo Leute

kann mir einer sagen wieso meine ScrollBox oder Form die Standard
Wheel Funktionen nicht unterstützt. Ich arbeite mit D6 unter XP.

XP hat einen Standard Treiber für die Wheel Unterstützung.

Mit Grüssen
Tau
http://www.quad-offroad.com
wer kämpft kann verlieren aber wer nicht kämpft hat verloren
( Delphi 7 )
  Mit Zitat antworten Zitat
CalganX

Registriert seit: 21. Jul 2002
Ort: Bonn
5.403 Beiträge
 
Turbo Delphi für Win32
 
#2

Re: ScrollBox ohne Wheel funktion ?

  Alt 19. Okt 2003, 19:14
Hi Tau,
funktioniert dein Wheel denn unter Windows normal? Des Weiteren stelle ich mir die Frage bei welchen Komponenten dieses Phänomen auftritt. Nur bei einer Scrollbox, oder auch bei Listview, Listbox und co?

Chris
  Mit Zitat antworten Zitat
Benutzerbild von APP
APP

Registriert seit: 24. Feb 2003
Ort: Graz (A)
705 Beiträge
 
Delphi 7 Enterprise
 
#3

Re: ScrollBox ohne Wheel funktion ?

  Alt 19. Okt 2003, 19:22
Hallo Tau,

vielleicht hilft Dir, was Peter Below in einer NG (borland.public.delphi.vcl.components.using)
geschrieben hat:


Zitat:
...
No, nothing at all special, i only set the images Autosize property to true to
make it adjust to the image size. This may in fact be a mouse driver problem.
Most wheel mouse drivers have a compatibility option that makes them send
normal scroll messages (not WM_MOUSEWHEEL messages) to a control if it has the
WS_VSCROLL style when the user operates the wheel. This works even with
controls that are not "wheel-aware".

Ah, yes. My mouse driver has a checkbox to activate MS Intellimouse
compatibility, if i check that the scrolling no longer works, so the mouse is
working in a somewhat smarter mode normally. The main problem seems to be that
the scrollbox does not take focus when clicked on, and the MS Intellimouse
driver will only send WM_MOUSEWHEEL messages to the control with focus.
So the
messages go to the form. The default handling in the VCL will only forward
them to the control with focus either, so no joy here as well.

You can use the forms OnMouseWheel event to fix this behaviour:

procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
Var
msg: Cardinal;
code: Cardinal;
i, n: Integer;
begin
If WindowFromPoint( mousepos ) = scrollbox1.Handle Then Begin
Handled := true;
If ssShift In Shift Then
msg := WM_HSCROLL
Else
msg := WM_VSCROLL;

If WheelDelta < 0 Then
code := SB_LINEUP
Else
code := SB_LINEDOWN;

n:= Mouse.WheelScrollLines;
For i:= 1 to n Do
scrollbox1.Perform( msg, code, 0 );
scrollbox1.Perform( msg, SB_ENDSCROLL, 0 );
End;
end;
Armin P. Pressler

BEGIN
...real programmers are using C/C++ - smart developers Delphi;
END;
  Mit Zitat antworten Zitat
Tau

Registriert seit: 17. Mär 2003
Ort: Bludenz
221 Beiträge
 
Delphi 7 Enterprise
 
#4

Re: ScrollBox ohne Wheel funktion ?

  Alt 20. Okt 2003, 00:10
Hallo APP

DANKE für deine Hilfe

Es funktioniert

mfg
Tau
http://www.quad-offroad.com
wer kämpft kann verlieren aber wer nicht kämpft hat verloren
( Delphi 7 )
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:38 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