문제

I'm having a little bit of a headache here since I can't really realize what's going on. So I have this TChromium element set as aligned to alClient. Now, since my borderStyle is bsNone (fullscreen app), I created 2 buttons to simulate minimize and quit behaviour. I anchored them to the top right, brought them to front, but, no luck, as they are still in the back of TChromium.

I'd show you some code but, I don't find anything relevant to the problem, as the explanation says it all. Any possible way to make those images overlap TChromium ?

도움이 되었습니까?

해결책

TImage, being a descendant of TGraphicControl, has no window handle, so it cannot appear in front of any control that does have a handle. TGraphicControl's painting actually occurs on its parent, and since TChromium is drawn by Google's code and not Delphi's, it's not aware of any Delphi-specific child-control tricks required by TGraphicControl.

Instead of TImage, use a real TButton control for your buttons. They are normal windowed controls, so they can appear in front of other windowed controls. If you don't like TButton specifically, then choose some other descendant of TWinControl instead.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top