Opened 15 years ago

Closed 15 years ago

#909 closed enhancement (fixed)

Feature Request; Close Tabs with middel mouse button

Reported by: dl9ekd Owned by: ksgeograf
Priority: low Milestone: Maestro-2.0
Component: Maestro Version:
Severity: trivial Keywords:
Cc: External ID:

Description

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.

Change History (6)

comment:1 by dl9ekd, 15 years ago

Type: defectenhancement

comment:2 by ksgeograf, 15 years ago

Is this consistent with other applications? I don't have a three button mouse (and never use the third button if it's there).

I'm worried that this is a confusing function. What applications have this feature?

comment:3 by ksgeograf, 15 years ago

Version: 2.0.1

comment:4 by dl9ekd, 15 years ago

hi, other application who use this is i.e. firefox and internetexplorer, eclipse, visual studio and more.

comment:5 by ksgeograf, 15 years ago

Milestone: Maestro-2.0
Status: newassigned

I see. I did not know that, I will add the fix, thank you.

comment:6 by ksgeograf, 15 years ago

Resolution: fixed
Status: assignedclosed

I applied changes in r3837.

Note: See TracTickets for help on using tickets.