【发布时间】:2015-11-24 14:46:56
【问题描述】:
按下按钮后,我想将面板的颜色更改为绿色:
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 透明度为假 按下按钮后结果相同。
我怎样才能做到正确?
【问题讨论】:
标签: c++ c++builder tpanel