按下按钮后,我想将面板的颜色更改为绿色:
ErrorDetectorPanel->Brush->Color = clLime;
不工作。
ErrorDetectorPanel->Color = clLime;
ErrorDetectorPanel->Refresh();
不工作。
带着这个瘾:
ErrorDetectorPanel->ParentColor = false;
ErrorDetectorPanel->Refresh();
它仍然不起作用。
试过这样:
HBRUSH brush = CreateSolidBrush(RGB(0, 255, 0));
SetWindowLong(ErrorDetectorPanel->Handle,WM_ERASEBKGND, 0);
SetWindowLong(ErrorDetectorPanel->Handle,GCLP_HBRBACKGROUND, (LONG)brush);
按下按钮后,TForm 透明度是错误的相同结果。
我怎样才能做到正确?