plashenkov / TBX

Themeable toolbars, menus and controls for Delphi
MIT License
46 stars 18 forks source link

TTBXLabel Paint bug on XE2 #2

Closed plashenkov closed 10 years ago

plashenkov commented 10 years ago

Issue imported from Google Code: https://code.google.com/p/tbxlib/issues/detail?id=4

Reported by pavel [at] tresnakovi.cz, Apr 7, 2013

What steps will reproduce the problem?

  1. Place TPageControl on form
  2. Create new Page
  3. Place TTBXLabel on new Page of PageControl

Sometime is graphics bug (see on attached picture)

RAD studio XE2 (Upd4 HotFix1)

tbxlabel_paintbug


Replace this code to remove BUG in unit TBXDkPanels.

Message.wParam and Message.lParam are different types !

procedure TTBXPanelObject.WMEraseBkgnd(var Message: TMessage);
begin
  if not DoubleBuffered or (LPARAM(Message.wParam) = Message.lParam) then
  begin
    if Color = clNone then
      DrawParentBackground(Self, TWMEraseBkgnd(Message).DC, ClientRect)
    else
      FillRectEx(TWMEraseBkgnd(Message).DC, ClientRect, Color);
  end;
  Message.Result := 1;
end;
plashenkov commented 10 years ago

Fixed in e45c8d5de1804f2ea1051a67391ab6d4f9ff8144