Skip to content

Unable to switch the tabs using mouse. Only switching the tab can be done through TabKey navigation at DesignTime #12390

Answered by Epica3055
Sekar47 asked this question in General
Discussion options

You must be logged in to vote

Try the following change

CustomTabControlDesigner.cs
        protected override bool GetHitTest(Point point)
        {
            if (tabControl != null)
            {
                for (int i = 0; i < tabControl.TabPages.Count; i++)
                {
                    Point clientPoint = tabControl.PointToClient(point);
                    if (tabControl.GetTabRect(i).Contains(clientPoint))
                    {
                        return true;
                    }
                }
            }
            return base.GetHitTest(point);
        }

Replies: 12 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Sekar47
Comment options

Comment options

You must be logged in to vote
1 reply
@LeafShi1
Comment options

LeafShi1 Dec 6, 2024
Collaborator

Answer selected by LeafShi1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VSDesigner Windows Forms out-of-proc designer related issues
7 participants
Converted from issue

This discussion was converted from issue #11642 on October 25, 2024 23:27.