Solved

Implement tab closing ala Firefox

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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