[DUG] Listview problem
David O'Brien
Dave at iccs.co.nz
Fri Feb 25 15:08:32 NZDT 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110225/d51b8dd0/attachment.html
More information about the Delphi
mailing list