Virtual TreeView selection width with toUseExplorerTheme

前端 未结 1 807
小蘑菇
小蘑菇 2021-01-02 16:53

When I use toUseExplorerTheme in TVirtualStringTree.PaintOptions it draws the selection like this:

相关标签:
1条回答
  • 2021-01-02 17:11

    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!

    0 讨论(0)
提交回复
热议问题