Q:

TLabel is not updated overlapped with TPanel

My environment: 
VCL application developped on RadStudio XE4 on Windows 7 pro (32bit).
tested on Windows 7 pro (32bit).

I found some strange behavior of software produced using RadStudio XE4. 
Strings of TLabel placed over TPanel is not updated correctly.
The simplest example of this is shown as the picture. In this software, TLabel shows current time for every second. As shown in the picture, the lower part (which is on TPanel) is not updated unless I put window of other software overlapped on the TPanel component.

Is this normal behavior for RadStudio? Or some bugs in the RadStudio?
If there is some workaround, I would like to know.

A:

TLabel is a TGraphicControl descendant. TPanel is a TWinControl descendant.  A TGraphicControl renders on the HDC of its Parent window, not on other child controls of the same Parent. When the TLabel is updated, it triggers a repaint of its Parent but not of the TPanel.  To force that repaint, call the TPanel's Update() or Invalidate() method whenever you make changes to the TLabel.

