Implement tab closing ala Firefox

Application dynamically adds tabs to tabcontrol based on user actions.  I would like to implement a Firefox-style technique to close (delete) the active tab.

Each tab has a text title and an icon from an imagelist.  When the tab is active (selected), I would like to display a small red "X" on the right side.  When the user clicks the "X" resources would be freed and the tab deleted from the tabcontrol collection.

I presume, I would have to draw it using GDI+ and compare coordinates in mouseup event?

Simpler way?  Code sample?
NomlasAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
There are many implementations at codeproject.com, like:
http://www.codeproject.com/KB/tabs/MDITabControl.aspx

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.