【发布时间】:2017-08-30 14:45:14
【问题描述】:
我有控制权,我将其显示为工具提示。我在 OnLayout 方法中更改了此控件的大小及其区域,如下所示,
protected override void OnLayout(LayoutEventArgs e)
{
this.Size = calculatedSize;
Region region= new Region(this.ClientRectangle);
region.Exclude(new Rectangle(ClientRectangle.Width - balloonPointerWidth, ClientRectangle.Top, balloonPointerWidth, balloonPointerHeight));
region.Exclude(new Rectangle(ClientRectangle.X, ClientRectangle.Top, ClientRectangle.Width - balloonPointerWidth, balloonPointerHeight));
this.Region = region;
}
如上所述,我已将控件显示为工具提示,并且区域中的修改更改仅在第二次显示时反映,而在第一次显示时未反映更改。
谁能告诉我,如何使更改在第一时间反映出来,以便将控件作为工具提示显示在更新的区域中。?
问候, Amal Raj U.
【问题讨论】:
标签: c# windows winforms controls