Solved

Implement tab closing ala Firefox

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

13 Experts available now in Live!

Get 1:1 Help Now