Panel에 배경은 투명하게 처리하고 글자(caption)만 보여줄수 있는 방법은 없나요?
투명 Panel에 글자(Caption)를 보여야 하는데.. Canvas로도 안되네요..
도와 주세여.. 제발..
========== Source ===================
var I : Integer;
FullRgn, ClientRgn, ControlRgn : THandle;
Margin, MarginX, MarginY, X, Y : Integer;
begin
Margin := (panel.Width - panel.ClientWidth) div 2;
FullRgn := CreateRectRgn(0, 0, panel.Width, panel.Height);
MarginX := Margin;
MarginY := panel.Height - panel.ClientHeight - Margin;
ClientRgn := CreateRectRgn(MarginX, MarginY, MarginX + panel.ClientWidth,
MarginY + panel.ClientHeight);
CombineRgn(FullRgn, FullRgn, ClientRgn, RGN_DIFF);
for I:=0 to panel.ControlCount-1 do begin
X := MarginX + panel.Controls[I].Left;
Y := MarginY + panel.Controls[I].Top;
ControlRgn := CreateRectRgn(X, Y, X + panel.Controls[I].Width,
Y + panel.Controls[I].Height);
CombineRgn(FullRgn, FullRgn, ControlRgn, RGN_OR);
end;
SetWindowRgn(panel.Handle, FullRgn, True);
TPaintPanel(panel).Canvas.Font.Color := clblue;
TPaintPanel(panel).Canvas.TextOut(panel1.Top+1, panel1.Left+2,'aaaaa');