Commit 0c192303 wangqianlong1993

圆角控件关闭圆角时不能恢复

1 个父辈 34925690
...@@ -196,6 +196,14 @@ namespace HZH_Controls.Controls ...@@ -196,6 +196,14 @@ namespace HZH_Controls.Controls
{ {
this.SetWindowRegion(); this.SetWindowRegion();
} }
else
{
//关闭圆角后显示为原矩形
GraphicsPath g = new GraphicsPath();
g.AddRectangle(base.ClientRectangle);
g.CloseFigure();
base.Region = new Region(g);
}
GraphicsPath graphicsPath = new GraphicsPath(); GraphicsPath graphicsPath = new GraphicsPath();
if (this._isShowRect || (_fillColor != Color.Empty && _fillColor != Color.Transparent && _fillColor != this.BackColor)) if (this._isShowRect || (_fillColor != Color.Empty && _fillColor != Color.Transparent && _fillColor != this.BackColor))
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!