[mapguide-trac] #909: Feature Request;
Close Tabs with middel mouse button
MapGuide Open Source
trac_mapguide at osgeo.org
Mon Mar 16 05:11:56 EDT 2009
#909: Feature Request; Close Tabs with middel mouse button
-----------------------+----------------------------------------------------
Reporter: dl9ekd | Owner: ksgeograf
Type: defect | Status: new
Priority: low | Milestone:
Component: Maestro | Version: 2.0.1
Severity: trivial | Keywords:
External_id: |
-----------------------+----------------------------------------------------
Hi,
I would like to close Tabs with the middel mouse button. Its realy easy to
integrate. Add a Click-Eventhandler to tabItems on Mainform with follwing
content:
{{{
private void tabItems_Click(object sender, EventArgs e)
{
MouseEventArgs eventArg = e as MouseEventArgs;
if (eventArg.Button == MouseButtons.Middle)
{
for (int i = 0; i < tabItems.TabCount; i++)
{
if
(tabItems.GetTabRect(i).Contains(eventArg.Location))
{
tabItems.SelectedIndex = i;
ClosePage();
break;
}
}
}
}
}}}
This is just a simple method, I am sure, there is a better one.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/909>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list