FillRect doesn't paint the complete TStringGrid cell in Delphi XE2

前端 未结 4 1421
既然无缘
既然无缘 2021-01-04 03:16

FillRect doesn\'t paint the complete TStringGrid cell in Delphi XE2. There is a gap of 3 pixels on the left side in the default color (with B

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 03:48

    This is expected behaviour in XE2 when DefaultDrawing = true and themes are enabled (I'm not going to argue about good or bad here - as you might have noticed, the behaviour is different for RigthToLeft mode...).

    A workaround is to check for this condition and decrement Rect.Left by 4 pixel before calling FillRect.

提交回复
热议问题