今天图老师小编要跟大家分享修改XPMenu让ToolButton在Down=True时正确显示,精心挑选的过程简单易学,喜欢的朋友一起来学习吧!
【 tulaoshi.com - 编程语言 】
XPMenu是一个不错的程序界面效果控件,但它也存在不少不足之处。我最近又对它作了一点修改。
if ((cdsChecked in State) and not (cdsHot in State)) then
begin
ACanvas.Brush.Color := FCheckedAreaColor;
HasBorder := true;
HasBkg := true;
end;
if (cdsIndeterminate in State) and not (cdsHot in State) then
begin
ACanvas.Brush.Color := FBSelectColor;
HasBkg := true;
end;
if ((cdsChecked in State) and not (cdsHot in State)) then
begin
ACanvas.Brush.Color := FCheckedAreaColor;
HasBorder := true;
HasBkg := true;
end;
{Modify: Conch 2005-3-10 在Down=true的按钮上画出边框}
if (Button.Down) and not (cdsHot in State) then
begin
HasBorder := true;
HasBkg := false;
end;
//Conch
if (cdsIndeterminate in State) and not (cdsHot in State) then
begin
ACanvas.Brush.Color := FBSelectColor;
HasBkg := true;
end;
来源:http://www.tulaoshi.com/n/20160219/1621301.html
看过《修改XPMenu让ToolButton在Down=True时正确显示》的人还看了以下文章 更多>>