When mouse moves above TListView items, there's that blue outline (see picture). How would I remove it?
The only way I know is to do all the item drawing manually... But maybe there's an easier way? Tried HotTrack=False, doesn't help :(
When mouse moves above TListView items, there's that blue outline (see picture). How would I remove it?
The only way I know is to do all the item drawing manually... But maybe there's an easier way? Tried HotTrack=False, doesn't help :(
That painting is done by the special explorer theme. That is added to the control by a call to SetWindowTheme(Handle, 'explorer', nil)
in TCustomListView.CreateWnd
. If you use the default theme then you will not get the hot tracking. You can make that happen by reverting the explorer window theme. For example in an interposer class:
type
TListView = class(ComCtrls.TListView)
protected
procedure CreateWnd; override;
end;
....
procedure TListView.CreateWnd;
begin
inherited;
SetWindowTheme(Handle, nil, nil);
end;
Of course, you'll also lose everything else that the explorer theme adds.
So far as I can tell, there are no notification messages that allow you to suppress the explorer theme hot tracking painting.