delphibitmapfixedtscrollbox

Keep a bitmap on a fixed position in TScrollBox


I put al kinds of frames on a TScrollBox. When scrolling they are being scrolled correctly. Now I want to add an bitmap that remains on a fixed postion. I tried a TImage having the same parent (a TPanel) as the TScrollBox. I do not see the bitmap assigned to the TImage even when I use BringToFront.

Can anybody help me out?

Thanks in advance,

Arnold


Solution

  • TImage is a descendant of TGraphicControl. Since it lacks a window handle, it cannot appear in front of a windowed control like TScrollBox. Put the TImage on a TPanel, which has a handle, and place the TPanel in front of (with the same parent as) the TScrollBox.