Profile Picture

NTabControl.Invalidate not working on tabs

Posted By Brad Swearingen 13 Years Ago
Author
Message
Brad Swearingen
Posted 13 Years Ago
View Quick Profile
Forum Guru

Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 53, Visits: 3

I've added a custom renderer to my NTabControl to paint certain tabs a different color at times.  This works fine and was easy to add.

However, when I need to indicate that my tab needs to be redrawn with the new color I call the NTabControl.Invalidate() method and the tabs don't get invalidated.  (I saw there was a NTabPage.Invalidate() method too but it doesn't redraw the tab either.) 

For the moment, instead, I'm setting the NTabControl.Visible to false and then back to true to get the tabs to be invalidated.  How does one invalidate the tab area of an NTabControl?  I'm on Win7 using the 11.1.17.12 build.



Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Brad,

Have you try nTabControl.Invalidate(true)?



Best Regards,
Nevron Support Team



Brad Swearingen
Posted 13 Years Ago
View Quick Profile
Forum Guru

Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 53, Visits: 3
Thanks, I had not tried that and it worked.  I was converting code that did something similar using an ownerdraw Windows.Form tab control and all it needed was the Invalidate() call to redraw its tabs.  Not a big deal but thought I would report it.



Similar Topics


Reading This Topic