Hello,
I created a class that inherits from Elegant.Ui.TabPage -
I did this for a chat type application in which i need to flash the small icon on the tab header
when a message is received. Works fine in a .Net tab control but the Elegant.Ui.TabPage does
not repaint when I swap the defaultsmallimage on a timer. However, if I move my mouse over the
the tab header repeatedly it will change the image.
How can I force a repaint? I tried calling this.Invalidate() but that didn’t help.
I also tried overriding the "OnPaint" and call that from the below function.
Nothing works.
Thanks,
Mike
private void _flashTimer_Tick(object sender, EventArgs e)
{
if (_currentImage==0)
{
_currentImage = 1;
this.DefaultSmallImage = _imgList.Images[_currentImage];
this.Update();
//this.OnPaint(null);
}
else
{
_currentImage = 0;
this.DefaultSmallImage = _imgList.Images[_currentImage];
this.Update();
//this.OnPaint(null);
}
}