When I use toUseExplorerTheme
in TVirtualStringTree.PaintOptions
it draws the selection like this:
Sorry, that was my fault. The statement I've suggested in this issue should have rather be:
procedure DrawBackground(State: Integer);
begin
// if the full row selection is disabled or toGridExtensions is in the MiscOptions, draw the selection
// into the InnerRect, otherwise into the RowRect
if not (toFullRowSelect in FOptions.FSelectionOptions) or (toGridExtensions in FOptions.FMiscOptions) then
DrawThemeBackground(Theme, PaintInfo.Canvas.Handle, TVP_TREEITEM, State, InnerRect, nil)
else
DrawThemeBackground(Theme, PaintInfo.Canvas.Handle, TVP_TREEITEM, State, RowRect, nil);
end;
The same applies also to the next nested procedure DrawThemedFocusRect
. The fix is now commited to the revision r587, so please update your Virtual Treeview. Thanks to @joachim for cooperation!