What I'd suggest is delving into the code where GetTopItem Event is called
and find the location where this is set. Rather than trying to identify a
scroll, it sounds like a change in the topviewitem is going to provide the
same trigger.

On Fri, Feb 25, 2011 at 3:08 PM, David O'Brien <d...@iccs.co.nz> wrote:

> I am working on an application (D2009) where I need to know when a
> TListView is Scrolled.
>
> I have used Application.OnMessage to look for WM_VScroll messages, but they
> do not happen, also have tried creating the below which I thought should
> work:
>
>
>
>   TLVScrollEvent = procedure(Sender: TObject) of object;
>
>
>
>   TICListView = class(TListView)
>
>   private
>
>     FOnScroll: TLVScrollEvent;
>
>   protected
>
>     Procedure WMVScroll( Var Msg: TMessage ); message WM_VSCROLL;
>
>     Procedure WMHScroll( Var Msg: TMessage ); message WM_HSCROLL;
>
>     property OnScroll: TLVScrollEvent read FOnScroll write FOnscroll ;
>
>   end;
>
>
>
> procedure Register ;
>
>
>
> implementation
>
>
>
> procedure Register;
>
> begin
>
>   RegisterComponents('Dave', [TICListView]);
>
> end;
>
>
>
> procedure TICListView.WMHScroll(var Msg: TMessage);
>
> begin
>
>   OnScroll ;
>
>   inherited;
>
> end;
>
>
>
> procedure TICListView.WMVScroll(var Msg: TMessage);
>
> begin
>
>   OnScroll ;
>
>   inherited;
>
> end;
>
>
>
> which also doesn’t fire. I have written a list of all messages fired when
> the scrollbar is moved, but there doesn’t seem to be anything useful…
>
>
>
> Anyone have a solution?
>
>
>
> Regards,
>
> Dave.
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi@delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
> unsubscribe
>



-- 
Kyley Harris
Harris Software
+64-21-671-821
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Reply via email to