bring to back doesnt work in c++ builder bcb6

278 views Asked by At

I have a TFrame with some components on it, and among all it I have a TPanel and a TPaintBox such that the PaintBox size is the same as the Panel.

I would like that user will see the Panel and not only the PaintBox.

The problem is that when I right click on the Panel and choose Control->Send to Back, it doesn't work.

Any assumption, or suggestion for solution?

*I am working with Borland C++Builder 6.

1

There are 1 answers

0
Remy Lebeau On

TPaintBox is a TGraphicControl descendant. It has no HWND of its own, it simply draws on its Parent when the Parent is painted. As such, a TPanel (which has an HWND of its own) can never appear behind a TPaintBox unless the TPaintBox is a child of the TPanel.