Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » how to force tab header to repaint when defaultsmallimage changes Collapse All
Subject Author Date
mike lindsey Aug 23, 2009 - 8:47 PM

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);

            }

        

        }


 


 


 


 


 

Technical Support Aug 26, 2009 - 7:06 AM

Thank you for the bug report. We have just fixed it. The fix will be available soon in the next version. Meanwhile you can call TabControl.Invalidate(true) to achieve the requested behavior.