Click here to Skip to main content
15,891,795 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hey everybody

I wonder how I can make a Circle notification of my Tabs in a TabControl, C# WindowsForms.

see image

Notificationer shall mean for example. Has happened two new messages in losses1 and 9 File is visible in Tab2

Hope you understand my question about which way I can get a circle to sit in each tab as well as have a number in the circle.

Good day to you all
Posted
Comments
Sergey Alexandrovich Kryukov 17-Nov-15 13:21pm    
Creating a correct round control is not a problem at all, but putting it over the tab area could be not so easy...
—SA
Sergey Alexandrovich Kryukov 17-Nov-15 13:28pm    
Interesting idea. I up-voted the question.
—SA

1 solution

Please see my comment to the question. On second though, I've found CodeProject article where this problem is solved: Painting Your Own Tabs - Second Edition[^].

As to some rounded (non-rectangle) control, this is easy. All you need to do is to provide appropriate rendering and, most importantly, set the property Control.Region to suitable System.Drawing.Region object representing non-rectangular shape:
https://msdn.microsoft.com/en-us/library/system.windows.forms.control.region(v=vs.110).aspx[^],
https://msdn.microsoft.com/en-us/library/system.drawing.region(v=vs.110).aspx[^].

This gives you a complete solution.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900