Solved

Implement tab closing ala Firefox

Posted on 2010-09-15
1
275 Views
Last Modified: 2012-05-10
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?
0
Comment
Question by:Nomlas
1 Comment
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 33688122
There are many implementations at codeproject.com, like:
http://www.codeproject.com/KB/tabs/MDITabControl.aspx

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now