[SOLVED] Wrong tab selected when torn or closed (EasyTabs)

i am currently facing a massive problem on EasyTabs... Whenever I close a tab, it doesnt select the tab behind it,  it skips the tab behind it and selects that tab.Has anyone gad this issue too and is there any fix?
Thanks!

EDIT:
I have found the issue. This problem occurs when you have two  base.WndProc(ref m);.

A post by brwck

Like 0 Dislike

Hiya @brwck,
Yeah it's similar to the issue in which when you tear a tab and then join it back to the same window, the tabs seem to switch places for some weird reason; I've yet to figure out how to fix the issue. I suggest submitting the issue to the official GitHub page of the EasyTabs project: https://github.com/lstratman/EasyTabs

It doesn't seem very active, so you may have to wait a while until you get a response from the developer 1f615

Like 0 Dislike

@adminI seem to have found the cause of the issue. It appears that this code messes up the EasyTabs code:

        const int WM_PARENTNOTIFY = 0x210;
        const int WM_LBUTTONDOWN = 0x201;
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == WM_LBUTTONDOWN || (m.Msg == WM_PARENTNOTIFY &&
                (int)m.WParam == WM_LBUTTONDOWN))
                menu.Hide();
            base.WndProc(ref m);

            if (m.Msg == WM_LBUTTONDOWN || (m.Msg == WM_PARENTNOTIFY &&
               (int)m.WParam == WM_LBUTTONDOWN))
                aslistpnl.Hide();
            base.WndProc(ref m);
        }

The code basically hides a panel when you click outside of it. Weird...

A post by brwck

Like +1 Dislike

Which file and line can the code be found? Did you solve the issue by removing that portion of code or by modifying it?

Like 0 Dislike

@admin It's a portion of code that hides a panel when it's clicked outside of the control.

A post by brwck

Like 0 Dislike

I'm just asking for clarification on the answer; where exactly was this code found in the "EasyTabs" solution (if it was in-fact an issue with the "EasyTabs" control itself)? Eg: The name of the file it was found in (such as "TitleBarTabs.cs") and the line number the portion of code starts at (such as "line 34").

Like 0 Dislike

It wasn't an issue with EasyTabs. It was in my browserwindow files. I wanted it so when you clicked outside the menu, the menu closes automatically. It seems to be a bug though with EasyTabs if you have

            base.WndProc(ref m);

in yourTabWindow code twice. I can't find what it's affecting but a simple removal of one

            base.WndProc(ref m);

and it fixed it

A post by brwck

Like +1 Dislike