I’ve come across a tab control that I can customize for my needs in creating a MDI window replacement. It is based on the KRBTabControl article from Karub Yaz?l?m on CodeProject.
I’ve added some built-in context menu that adds a few options for closing a tab, closing all tabs, closing all other tabs and view a list of the available tabs from a modal dialog window. The rest is pretty much the original control except for some enums that I moved around.
My version can be found here.
* Update *
I’ve added an event to the control to fire when a tab page get removed. The code to achieve this looks like this:
public event TabPageRemovedDelegate TabPageRemoved;
private void RaiseTabPageRemoved(TabPageEx tab)
{if (TabPageRemoved != null)
TabPageRemoved(tab);
}
The ‘RaiseTabPageRemoved’ method then gets called from the main OnMouseClick plus my new context menu events to close tabs.
hi!.
how can i use the tab page removed?
i canr find how.
I don’t really understand your question?
i mean.. how can i add an event that gets fired when a tab its getting closed?