Solved

Implement tab closing ala Firefox

Posted on 2010-09-15
1
277 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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